From a75835e077cb395d19cab55446d9c9da552e1dd2 Mon Sep 17 00:00:00 2001 From: Joel Einbinder Date: Fri, 17 Jul 2020 16:34:31 -0700 Subject: [PATCH] chore(jest): halve the max workers (#3017) --- jest.config.js | 11 +++++++++++ jest.config.json | 9 --------- 2 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 jest.config.js delete mode 100644 jest.config.json diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000000..3b24295788 --- /dev/null +++ b/jest.config.js @@ -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' +}); diff --git a/jest.config.json b/jest.config.json deleted file mode 100644 index 355f4c1649..0000000000 --- a/jest.config.json +++ /dev/null @@ -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" -}