O'Reilly logo

React 16 Tooling by Adam Boduch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Tests should feel natural

Jest makes it easy to get started with running your tests, but what about writing tests? The API exposed by Jest makes it easy to write tests that don't have a lot of moving parts. The API documentation (https://facebook.github.io/jest/docs/en/api.html) is organized into sections that make it easy to find what you need. For example, if you're writing a test and you need to validate an expectation, you can find the functions that you need in the Expect section of the API docs. Or, you might need help configuring a mock function—the Mock Functions section of the API docs has everything you need on this topic.

Another area where Jest really stands out is when you need to test asynchronous code. This typically involves ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required