A repository written for a blog post about testing React with Jest.
git clone
this repocd testing-react-with-jest
npm install
- In one tab, run
npm run watch
. This will fire up Webpack and rebuild your app on each change. - In another tab, run
npm start
. This will fire up a local server that will refresh automatically when the code changes. open http://localhost:8081
to view to the app.
Run npm test
to run the tests with Jest.
Run npm test -- --watch
to run Jest and have it automatically rerun everytime you change a file.
Please feel free to raise an issue if you have any Qs :)