© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
E. ElromReact and Librarieshttps://doi.org/10.1007/978-1-4842-6696-0_9

9. Testing Part I: Unit Test Your React App

Elad Elrom1  
(1)
Montvale, NJ, USA
 
When it comes to testing your React app, there are three areas of testing to consider.
  • Unit testing: Testing the smallest piece of code that can be isolated.

  • Integration testing: Combining individual modules and testing them together

  • E2E testing: Simulating a real end user’s experience

In this chapter, you will learn how to unit test a React app like a pro.

When it comes to unit testing, there are many libraries that can be used with React such as Jest, Enzyme, Sinon, Mocha, Chai, Ava, and Tape. These libraries are ...

Get React and Libraries: Your Complete Guide to the React Ecosystem now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.