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
JonWallsten authored Nov 30, 2021
1 parent 5640f88 commit d8e4cbf
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 @@ -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,
Expand Down

0 comments on commit d8e4cbf

Please sign in to comment.