
You will use Jest to write and run unit tests, and you will implement React Testing Library as a helper DOM ( Document Object Model) library to handle interacting with components. In this tutorial, you will test asynchronous code and interactions in a sample project containing various UI elements. Both Jest and React Testing Library come pre-packaged with Create React App and adhere to the guiding principle that testing apps should resemble how the software will be used.

React Testing Library offers a set of testing helpers that structure your tests based on user interactions rather than components’ implementation details. Jest is a JavaScript test runner that provides resources for writing and running tests. Obtaining solid test coverage is imperative for building confidence in your web application.

The author selected Vets Who Code to receive a donation as part of the Write for DOnations program.
