Project to submit · JavaScript and React course · Module 13: Testing React
Mentor Project: Test suite for space application
Congratulations, pilot! You have finished all the lessons about testing React, so it is time for a real pre-launch check. Build your own React app or extend the Space Mission Control Center from the main project, and write a complete test suite for it. It should include: a dashboard with data from an API (in the tests a jest.fn() or MSW mock instead of a real server) that handles loading and errors, a form with validation checked with userEvent and messages with role="alert", at least one custom hook tested with renderHook, unit tests of the helper functions, integration tests of several components and a snapshot of a simple presentational component. Check both the scenarios where everything works and the edge cases and errors. Push the project with its tests to GitHub and submit a link to the repository. Your mentor will run npm test, so make sure every test passes on a fresh copy of the project.
Task
Write a complete test suite for your own React app or the Space Mission Control Center and submit a link to the repository with the code and the tests.