Skip to content

Commit 0131955

Browse files
authored
Support Jest --watchAll flag (facebook#3804)
* Support Jest --watchAll flag * Use clearer condition * Add comma
1 parent 3efe4e0 commit 0131955

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: 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)