diff --git a/jest.config.js b/jest.config.js index ee19fa41c1aa8..1b2fb2f48dc2b 100644 --- a/jest.config.js +++ b/jest.config.js @@ -11,7 +11,7 @@ const tsJestOptions = { }; /** @type {import('jest').Config} */ -module.exports = { +const config = { verbose: true, testEnvironment: 'node', testRegex: '\\.(test|spec)\\.(js|ts)$', @@ -23,3 +23,10 @@ module.exports = { '^@/(.*)$': '/src/$1', }, }; + +if (process.env.CI === 'true') { + config.maxWorkers = 2; + config.workerIdleMemoryLimit = 2048; +} + +module.exports = config;