Chapter 10. Testing JavaScript Applications
To get started testing in JavaScript, we will need to create a ReactJS application and configure it for testing using the Mocha, Chai, Enzyme, and Sinon libraries.
These steps were discussed in detail in Chapter 7, Setting up the JavaScript Environment, so here, we will simply walk through the steps and not explain them in detail.
The goals of this chapter are:
- Create the Speaker Meet React application
- Talk through our plan of attack for testing the application:
- What is our approach?
- What parts of the app can we even test?
- What part of the app do we start with?
- Write tests and complete a couple of features for the application:
- Speaker listing
- Speaker detail
Once this chapter is finished, you should be capable of unit-testing any React-based application.