chore(jest): halve the max workers (#3017)

This commit is contained in:
Joel Einbinder 2020-07-17 16:34:31 -07:00 committed by GitHub
parent 68ef90d258
commit a75835e077
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 9 deletions

11
jest.config.js Normal file
View File

@ -0,0 +1,11 @@
module.exports = /** @type {import('@jest/types').Config.InitialOptions} */ ({
// all of our tests have a browser and a node process, so the default max workers is too many.
maxWorkers: Math.ceil(require('os').cpus().length / 2),
rootDir: './test',
testEnvironment: './jest',
testMatch: ['**/?(*.)jest.[jt]s'],
testRunner: 'jest-circus/runner',
testTimeout: 10000,
globalSetup: './jest/setup.js',
globalTeardown: './jest/teardown.js'
});

View File

@ -1,9 +0,0 @@
{
"rootDir": "./test",
"testEnvironment": "./jest",
"testMatch": ["**/?(*.)jest.[jt]s"],
"testRunner": "jest-circus/runner",
"testTimeout": 10000,
"globalSetup": "./jest/setup.js",
"globalTeardown": "./jest/teardown.js"
}