The general software development paradigm includes planning, analysis, design, implementation, and maintenance. During any software development process, it is challenging, but required, to build efficient and error-free software. Making software error-free requires rigorous inspection, testing, dry running, and debugging. Making any web application error-free is intractable. However, empirical studies have revealed that testing in web application development can sometimes be exhaustive. There are a multitude of JavaScript frameworks that can be used for unit testing. In this chapter, we will use Jest, which is a testing framework from Facebook.
The main topics that will be covered in this chapter are as follows:
- Setting up Jest
- Understanding how to test ES6 components
- Exploring snapshot testing for React components
- Testing Redux and its components