To keep your application maintainable, it is good practice to have testing set up for your project. Where some developers hate writing tests and therefore try to avoid writing them, other developers like to make testing the core of their development process by implementing a test-driven development (TDD) strategy. There are many opinions about testing your applications and how to do this. Luckily, when building an application with React, many great libraries can help you with testing.
In this chapter, you'll use two libraries to unit test React applications. The first one is Jest, which is maintained by Facebook itself and ships with Create React App. The other tool is called Enzyme, which has more functionality than Jest and can be used to test entire life cycles within your components. Together, they are a great fit...