How to write tests for a React app that use hooks
| back | ||
| front | ||
| README.md | ||
React hooks testing
Setup
Prerequisites: node
Start the back-end:
cd back/
npm run start
Start the front-end (in an other terminal)
cd front/
npm install
npm run front:dev
Run the tests:
npm run test
Instructions
There are unit tests for the Footer component, but they're no business logic there!
How can we add automatic tests for the ShowFact component ?