April 2020
Intermediate to advanced
716 pages
18h 55m
English
In order to set up Jest and integrate the test code with our projects, we first need to install the relevant Node packages. The following packages will be required in order to write the test code and run the tests:
To install these packages as devDependencies, run the following yarn command from the command line:
yarn add --dev jest babel-jest react-test-renderer
Once these packages are installed, we can start adding tests after configuring the test runner script, as discussed in the next section.