Skip to Content
React 16 Tooling
book

React 16 Tooling

by Adam Boduch, Christopher Pitt
April 2018
Intermediate to advanced content levelIntermediate to advanced
298 pages
6h 34m
English
Packt Publishing
Content preview from React 16 Tooling

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pro React 16

Pro React 16

Adam Freeman

Publisher Resources

ISBN: 9781788835015Supplemental Content