classtranscribe / FrontEnd

The React + Redux Frontend for ClassTranscribe
https://classtranscribe.illinois.edu
Other
25 stars 27 forks source link

Add jest + react testing library for unit testing #802

Closed harsh183 closed 1 month ago

harsh183 commented 1 month ago

Jest is an industry standard for react and usually included by default with create react app, and with some effort I was able to add it in for testing out https://github.com/classtranscribe/FrontEnd/pull/801. Usually this is paired with React Testing Library for having nice UI selectors that work well with react.

I can add the following links to the wiki on testing along with a small writeup:

angrave commented 1 month ago

Merging. It should be possible to now add jest tests check as part of the CI workflow-

https://github.com/classtranscribe/FrontEnd/blob/staging/.github/workflows/ci.yaml