April 2020
Intermediate to advanced
716 pages
18h 55m
English
In order to run any test code that we write using Jest, we will define a script command to run the tests. We will update the run scripts defined in package.json in order to add a script for running tests with the jest command, as shown in the following code:
"scripts": { "test": "jest" }
With this script defined, if we run yarn test from the command line, it will prompt Jest to find the test code in the application folders and run the tests. In the next section, we will add the folder that will contain the test code files for the project.
Read now
Unlock full access