Jest official documentation:
- https://jestjs.io/docs/en/getting-started
- https://jestjs.io/docs/en/using-matchers
- https://jestjs.io/docs/en/asynchronous
- https://jestjs.io/docs/en/setup-teardown
React Testing Library:
- Introduction with example: https://testing-library.com/docs/react-testing-library/example-intro
- Finding (=Querying) DOM elements: https://testing-library.com/docs/dom-testing-library/api-queries/
- Check elements NON existence in DOM: https://timonweb.com/javascript/how-to-test-if-element-existsdoesnt-exist-with-jest-and-react-testing-library/
- Find a DOM element by ID: https://stackoverflow.com/questions/53003594/find-element-by-id-in-react-testing-library
Videos:
-
JEST Testing starter series for getting the concepts step by step (excellent series!): https://www.youtube.com/watch?v=esVwR4lGwQE&list=PLLnpHn493BHEqP3gD1pCJYhxX6v2gBZzj
-
React Testing - solid introduction video - (including types of tests): https://www.youtube.com/watch?v=ZmVBCpefQe8
-
Testing Express routes - with Supertest (great video): https://www.youtube.com/watch?v=r8sPUw4uxAI
-
The Testing Workflow - "Green Red Refactor": https://www.youtube.com/watch?v=Y5XIjXcWaK8
Advanced:
- Jest Mock functions: https://jestjs.io/docs/en/mock-functions
- Snapshot testing of React components: https://jestjs.io/docs/en/snapshot-testing
- Snapshot testing mini video: https://www.youtube.com/watch?v=9liG4PuqKY0