Skip to content

Commit

Permalink
Support Jest --watchAll flag (facebook#3804)
Browse files Browse the repository at this point in the history
* Support Jest --watchAll flag

* Use clearer condition

* Add comma
  • Loading branch information
gaearon authored Jan 15, 2018
1 parent 3efe4e0 commit 0131955
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ if (process.env.SKIP_PREFLIGHT_CHECK !== 'true') {
const jest = require('jest');
const argv = process.argv.slice(2);

// Watch unless on CI or in coverage mode
if (!process.env.CI && argv.indexOf('--coverage') < 0) {
// Watch unless on CI, in coverage mode, or explicitly running all tests
if (
!process.env.CI &&
argv.indexOf('--coverage') === -1 &&
argv.indexOf('--watchAll') === -1
) {
argv.push('--watch');
}

Expand Down

0 comments on commit 0131955

Please sign in to comment.