In this chapter, you learned about the benefits of testing, and the frameworks you can use to cover your React components with tests. Jest is a fully-featured tool while Mocha lets you customize your experience.
The TestUtils let you render your components outside a browser and Enzyme is a powerful tool to access the output of rendering within the tests. We have seen how to test components using mocks and writing expectations.
We learned how Snapshot Testing can make it even easier to test the output of components and its code coverage tools helps you monitor the testing state of the codebase.
It is important to bear in mind common solutions when it comes to testing complex components such as Higher-Order Cmponents or forms with multiples nested fields.
Finally, you have learned how the React Developer Tools help debugging and how to approach error handling in React.