Skip to content

Commit

Permalink
jest-worker: Avoid crash when "--max-old-space-size" inside process.e…
Browse files Browse the repository at this point in the history
…xecArgv
  • Loading branch information
SuperOleg39 committed Nov 29, 2021
1 parent 40a9027 commit 9431272
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/jest-worker/src/workers/NodeThreadsWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default class ExperimentalWorker implements WorkerInterface {
JEST_WORKER_ID: String(this._options.workerId + 1), // 0-indexed workerId, 1-indexed JEST_WORKER_ID
},
eval: false,
execArgv: process.execArgv,
execArgv: process.execArgv.filter(v => !/^--(max_old_space_size)/.test(v)),
// @ts-expect-error: added in newer versions
resourceLimits: this._options.resourceLimits,
stderr: true,
Expand Down

0 comments on commit 9431272

Please sign in to comment.