Skip to content

Commit 43ba47a

Browse files
committed
scripts/test: Use maxWorkers=4 when running on CI
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.
1 parent 9bea75e commit 43ba47a

File tree

1 file changed

+3
-0
lines changed
  • packages/react-scripts/scripts

1 file changed

+3
-0
lines changed

packages/react-scripts/scripts/test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ const argv = process.argv.slice(2);
3232
if (!process.env.CI && argv.indexOf('--coverage') < 0) {
3333
argv.push('--watch');
3434
}
35+
else {
36+
argv.push('--maxWorkers=4');
37+
}
3538

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

0 commit comments

Comments
 (0)