This is the example code for a companion article on testing React modules. Following this code you can take your front-end testing beyond unit tests and achieve the following:
- a way to test user events
- test the response to those events
- make sure the right things render at the right time
- run tests in many browsers
- re-run tests on file changes
- work with continuous integration systems
===========================
To run test use:
npm test
To run applicatoin use:
npm start
===========================
Reference article:
https://www.toptal.com/react/how-react-components-make-ui-testing-easy