I used react gatsby (just want to give it a try no specific reasons) to develop this application but the jest and puppeteer combo can be used to test any application that runs on the browser
Click to watch the execution of the test cases
https://drive.google.com/file/d/1dN5VRUiCY6BRG0dzE7R56X-si1Ox0BSC/preview
You need to have node > 9
npm i
npm start
npm test
- Headless mode (Default) This runs the test cases in the background parallelly. This is the default behaviour.
export HEADLESS=true
npm test
- Non-Headless mode This runs the test cases in the foreground. The runInBand flag, runs the test in series. So that you can view the execution of one test case at a time. This is optional though.
export HEADLESS=false
npm test -- --runInBand