Skip to content

Commit a60140f

Browse files
BenoitAvertygaearon
authored andcommitted
Disable jest watch mode when --coverage flag is present (#1229)
1 parent 7f9fb29 commit a60140f

File tree

1 file changed

+2
-2
lines changed
  • packages/react-scripts/scripts

1 file changed

+2
-2
lines changed

Diff for: packages/react-scripts/scripts/test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ require('dotenv').config({silent: true});
2121
const jest = require('jest');
2222
const argv = process.argv.slice(2);
2323

24-
// Watch unless on CI
25-
if (!process.env.CI) {
24+
// Watch unless on CI or in coverage mode
25+
if (!process.env.CI && argv.indexOf('--coverage') < 0) {
2626
argv.push('--watch');
2727
}
2828

0 commit comments

Comments
 (0)