Skip to content

Commit 312c8dd

Browse files
authored
Speed up watch mode tests
... according to https://ivantanev.com/make-jest-faster/ I used this option in my own project and the test time gets reduced from 4s to 1.5s,I think it is worth applying.
1 parent 929d3d4 commit 312c8dd

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

scripts/test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ const argv = process.argv.slice(2);
2020
// Watch unless on CI or in coverage mode
2121
if (!process.env.CI && argv.includes('--coverage') === false) {
2222
argv.push('--watch');
23+
// Speed up watch mode tests according to https://ivantanev.com/make-jest-faster/
24+
argv.push('--maxWorkers=25%');
2325
}
2426

2527
jest.run(argv);

0 commit comments

Comments
 (0)