This project is a small example of how to build tests in a React app using Jest and Testing library. Jest is a framework to build tests in Javascript. The React Testing Library is a very light-weight solution for testing React components. It provides light utility functions on top of react-dom and react-dom/test-utils, in a way that encourages better testing practices. The purpose of this project is to study how to build tests in a React app using Jest and Testing library.
This project was developed with the following technologies:
To run the project locally follow these steps:
1. To clone the project, run this command:
git clone https://github.com/arrudadev/react-unit-testing.git
2. Install dependencies:
yarn install
Run the following command to run the tests:
yarn test
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue. Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/amazing-feature
) - Commit your Changes (
git commit -m 'feat: Add some Amazing Feature'
) - Push to the Branch (
git push origin feature/amazing-feature
) - Open a Pull Request
After your pull request is merged, you can safely delete your branch.
For more information read the Contributing Guidelines.
People who contributed to this project.
![]() Alexandre Arruda |
This project is licensed under the MIT License - see the LICENSE file for details.