Chapter 11: Writing Tests for React and Node.js
So far, we've written a lot of code and come across a variety of problems. We haven't yet implemented automated testing for our software; however, it's a common approach to make sure everything works after making changes to your application. Automated testing drastically improves the quality of your software and reduces errors in production.
To achieve this, we will cover the following main topics in the chapter:
- How to use Mocha for testing
- Testing the GraphQL application programming interface (API) with Mocha and Chai
- Testing React with Enzyme and JSDOM