Skip to content

Unit tests

Nick Watts edited this page Sep 28, 2022 · 9 revisions

Unit tests are located in the src directory side by side with the module that they test (the test for some-module.js should be named some-module.test.js and be located in the same directory as some-module.js).

To run tests, run yarn test from the root directory. This starts a process that watches for changes in files and re-runs tests after a file is changed. To run tests once, use yarn test --watchAll=false. To generate a coverage report, use yarn test --coverage --watchAll=false.

Clone this wiki locally