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

Running tests using standalone Jest

The test script from react-scripts that you just learned about in the previous section is a great tool to have running in the background while you're building your application. It gives you immediate feedback as you implement components and unit tests.

Other times, you just want to run all tests and have the process exit as soon as the result output is printed. For example, if you're integrating Jest output into a continuous integration process or if you just want to see test results run once, you can run Jest directly.

Let's try running Jest on its own. Make sure that you're in your project directory still and that you've stopped the npm test script from running. Now just run:

jest

Rather than running ...

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