Skip to content

Commit

Permalink
scripts/test: Use maxWorkers=4 when running on CI
Browse files Browse the repository at this point in the history
It seems that Jest runs much faster in Travis when it's ran with this
flag.  E.g. for one particular project, this made the frontend testing
time drop from 20 minutes to 2 minutes.
  • Loading branch information
suutari-ai committed Jan 15, 2018
1 parent 9bea75e commit 43ba47a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/react-scripts/scripts/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ const argv = process.argv.slice(2);
if (!process.env.CI && argv.indexOf('--coverage') < 0) {
argv.push('--watch');
}
else {
argv.push('--maxWorkers=4');
}

// @remove-on-eject-begin
// This is not necessary after eject because we embed config into package.json.
Expand Down

0 comments on commit 43ba47a

Please sign in to comment.