We need to ensure that each component has test coverage of more than 80 percent.
- Unit Testing: Jest - React testing library
- End-to-End Testing: Cypress
src/
├── tests/
│ ├── components/
│ ├── containers/
│ └── ...
├── App.test.tsx
└── ...To run unit tests:
yarn test
yarn test:coverageTo run end-to-end tests:
npx cypress openUse describe and it blocks for structuring tests. Mock API calls using jest.mock or cy.intercept.