diff --git a/packages/jest-worker/src/workers/NodeThreadsWorker.ts b/packages/jest-worker/src/workers/NodeThreadsWorker.ts index 70551119b04b..f28b834a5ee2 100644 --- a/packages/jest-worker/src/workers/NodeThreadsWorker.ts +++ b/packages/jest-worker/src/workers/NodeThreadsWorker.ts @@ -67,7 +67,7 @@ export default class ExperimentalWorker implements WorkerInterface { eval: false, // Suppress --max_old_space_size flags while preserving others (like --harmony). See https://nodejs.org/api/worker_threads.html#new-workerfilename-options execArgv: process.execArgv.filter( - v => !/^--(max_old_space_size)/.test(v), + v => !/^--(max_old_space_size|max-old-space-size)/.test(v), ), // @ts-expect-error: added in newer versions resourceLimits: this._options.resourceLimits,