Trybe Project - React Testing Library.
Creating a test routine for a Pokédex application using React Testing Library.
- Use selectors from the React Testing Library in automated tests;
- Simulate events with React-Testing-Library in automated tests;
- Test asynchronous logic flows with the React Testing Library;
- Write tests that allow refactoring the structure of application components without having to change them;
- Create mock APIs using fetch.
- Test inputs.
npm install
As the project consists of creating tests, initially it is necessary to run the application:
npm start
And then run the tests:
npm test
To "test the tests", that is, to verify if the tests created are really fulfilling their role, the Stryker Mutator library was used. To run it, use the command below for each of the configuration files located in the ./stryker folder
:
npx stryker run ./stryker/filename.conf.json