This project was bootstrapped with Create React App.
The React Testing Library is a very lightweight 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. Its primary guiding principle is:
# The more your tests resemble the way your software is used, the more confidence they can give you.
This is an example project of how to test react components using react-testing-library and Jest. The @testing-library family of packages helps you test UI components in a user-centric way.
DOM Testing Library works with any environment that provides DOM APIs, such as Jest, Mocha + JSDOM, or a real browser
https://www.robinwieruch.de/react-testing-library
https://kentcdodds.com/blog/fix-the-not-wrapped-in-act-warning
npm install --save-dev @testing-library/react
or
yarn add --dev @testing-library/react