About Testing and Debugging

React, thanks to its components, makes it easy to test our applications. There are many different tools that we can use to create tests with React, and here we'll cover the most popular ones to understand the benefits they provide.

Jest is an all-in-one testing framework solution, maintained by Christopher Pojer from Facebook and contributors within the community, and aims to give you the best developer experience. We will look at both ways of building the best test environment.

By the end of the chapter, you'll be able to create a test environment from scratch and write tests for your application's components.

In this chapter, we will look at the following topics:

  • Why it is important to test our applications, and how this helps developers move faster
  • How to set up a Jest environment to test components using Enzyme
  • What Enzyme is and why it is a must-have for testing React applications
  • How to test a real-world component
  • How to test events
  • The React developer tools and some error-handling techniques
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.66.13