Skip to content
This repository has been archived by the owner on Jan 26, 2019. It is now read-only.

Commit

Permalink
Respect explicitly set --watchAll, and favor it over --watch (#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
DorianGrey committed Apr 11, 2018
1 parent 6f0fd49 commit 3d26394
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 @@ -26,8 +26,12 @@ require('../config/env');
const jest = require('jest');
let 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 3d26394

Please sign in to comment.