Skip to content

Commit 19e0bb1

Browse files
authored
Support Jest --watchAll flag (#3804)
* Support Jest --watchAll flag * Use clearer condition * Add comma
1 parent f5708c6 commit 19e0bb1

File tree

1 file changed

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

1 file changed

+6
-2
lines changed

packages/react-scripts/scripts/test.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,12 @@ if (process.env.SKIP_PREFLIGHT_CHECK !== 'true') {
3333
const jest = require('jest');
3434
const argv = process.argv.slice(2);
3535

36-
// Watch unless on CI or in coverage mode
37-
if (!process.env.CI && argv.indexOf('--coverage') < 0) {
36+
// Watch unless on CI, in coverage mode, or explicitly running all tests
37+
if (
38+
!process.env.CI &&
39+
argv.indexOf('--coverage') === -1 &&
40+
argv.indexOf('--watchAll') === -1
41+
) {
3842
argv.push('--watch');
3943
}
4044

0 commit comments

Comments
 (0)