From 391a041057cbf6877c99145f55b7a340561385ce Mon Sep 17 00:00:00 2001 From: Dayle Salmon <13015201+daylesalmon@users.noreply.github.com> Date: Sat, 27 Mar 2021 17:49:55 +0000 Subject: [PATCH] Updated cmd command for running coverage test Coverage tests don't work when in the default watch mode, so watchAll=false must be set to get the correct coverage results. This isn't clearly documented, and this change includes that command. --- docusaurus/docs/running-tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/running-tests.md b/docusaurus/docs/running-tests.md index 4090a1fcd6f..eea40f49246 100644 --- a/docusaurus/docs/running-tests.md +++ b/docusaurus/docs/running-tests.md @@ -176,7 +176,7 @@ Similarly, `fit()` lets you focus on a specific test without running any other t Jest has an integrated coverage reporter that works well with ES6 and requires no configuration. -Run `npm test -- --coverage` (note extra `--` in the middle) to include a coverage report like this: +Run `npm test -- --coverage --watchAll=false` (note extra `--` in the middle) to include a coverage report like this: ![coverage report](https://i.imgur.com/5bFhnTS.png)