Skip to content

Commit 6a0ce11

Browse files
committed
ci(jest): set max concurrency to number of cpus - 1, with a minimum of 10
1 parent 9919444 commit 6a0ce11

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jest.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ module.exports = {
1010
testRunner: 'jest-circus/runner',
1111
// ? 24h if debugging so MMS and other tools don't choke, otherwise 1m
1212
testTimeout: 1000 * 60 * (process.env.VSCODE_INSPECTOR_OPTIONS ? 60 * 24 : 1),
13-
maxConcurrency: require('node:os').cpus().length - 1,
13+
// ? Minimum of 10 concurrent tests executed at once; maximum of cpu cores - 1
14+
maxConcurrency: Math.max(require('node:os').cpus().length - 1, 10),
1415
verbose: false,
1516
testPathIgnorePatterns: ['/node_modules/', '/dist/'],
1617
setupFilesAfterEnv: ['./test/setup.ts'],

0 commit comments

Comments
 (0)