In this section, we will add unit and integration testing to the hotel review application that was created in Create React App. This application lets you add reviews to a list of hotels and controls this data from a global Context. Jest and Enzyme will be used to render React components without a DOM and test assertions on these components.
Hotel review application
Unit testing with Jest
Unit testing is an important part of your application since you want to know that your functions and components behave as expected, even when you make code changes. For this, you're going to use Jest, an open source testing package for JavaScript applications that was created by Facebook. With Jest, you can test assertions, for example...