Chapter 16. Unit testing React with Jest

 

This chapter covers

  • Reasons to use Jest
  • Unit testing with Jest
  • UI testing with Jest and TestUtils

In modern software engineering, testing is important. It’s at least as important as using Agile methods, writing well-documented code, and having enough coffee on hand—sometimes even more so. Proper testing will save you from many hours of debugging later. The code isn’t an asset, it’s a liability, so your goal is to make it as easy to maintain as possible.

16.1. Types of testing

16.2. Why Jest (vs. Mocha or others)?

16.3. Unit testing with Jest

16.4. UI testing React with Jest and TestUtils

16.5. TestUtils wrap-up

16.6. Quiz

16.7. Summary

16.8. Quiz answers