Skip to content

Commit

Permalink
Support Jest --watchAll flag (#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 f5708c6 commit 19e0bb1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/react-scripts/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 19e0bb1

Please sign in to comment.