Closed RyanMarten closed 4 years ago
Switching back to using create react app scripts and their jest setup because it works natively with React, whereas my custom setup requires plain javascript.
So I will have to find a way for it to generate a coverage report instead of configuring the jest package. There is some documentation here: https://create-react-app.dev/docs/running-tests/#continuous-integration
This suggests npm test -- --coverage
Using yarn now instead because npm is giving me problems and people suggest yarn
npm run test -- --coverage --watchAll=false
This now the way to run a single test over the files in the repo and get a coverage report in /app/coverage/coverage-final.json
I'll update this in the github actions file
As an example of how to write tests for the rest of the app.
I will be using jest to do this