Skip to content

Commit 3d26394

Browse files
authored
Respect explicitly set --watchAll, and favor it over --watch (wmonk#298)
1 parent 6f0fd49 commit 3d26394

File tree

1 file changed

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

1 file changed

+6
-2
lines changed

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

+6-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@ require('../config/env');
2626
const jest = require('jest');
2727
let argv = process.argv.slice(2);
2828

29-
// Watch unless on CI or in coverage mode
30-
if (!process.env.CI && argv.indexOf('--coverage') < 0) {
29+
// Watch unless on CI, in coverage mode, or explicitly running all tests
30+
if (
31+
!process.env.CI &&
32+
argv.indexOf('--coverage') === -1 &&
33+
argv.indexOf('--watchAll') === -1
34+
) {
3135
argv.push('--watch');
3236
}
3337

0 commit comments

Comments
 (0)