In this project, I focus on testing in react. When you build react project using npx create-react-app
, the testing environment is already set up for you. Jest test runner
(Jest) and Reast Testing Library
( react testing library ) are set up for you.
In this repo, you will find examples of implementation of react unit testing
, integration testing
and end-to-end
testing. I also go into testing Async
functions and also mocking
. I even go into demostrating how to incoporate state
in testing and tests for different things when some action
such as click event
occurs.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.
The page will reload when you make changes.
You may also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
👤 James Serengia
- GitHub: @serengia
- Twitter: @jamesserengia
- LinkedIn: LinkedIn
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
- Hat tip to anyone who inspired this project
This project is MIT licensed.