| | |
| | | path().resolve(__dirname, './threadChild.js'), |
| | | { |
| | | eval: false, |
| | | // @ts-expect-error: added in newer versions |
| | | resourceLimits: this._options.resourceLimits, |
| | | stderr: true, |
| | | stdout: true, |
| | | workerData: { |
| | | cwd: process.cwd(), |
| | | env: { |
| | | ...process.env, |
| | | JEST_WORKER_ID: String(this._options.workerId + 1) // 0-indexed workerId, 1-indexed JEST_WORKER_ID |
| | | }, |
| | | // Suppress --debug / --inspect flags while preserving others (like --harmony). |
| | | execArgv: process.execArgv.filter(v => !/^--(debug|inspect)/.test(v)), |
| | | silent: true, |
| | | ...this._options.forkOptions |
| | | } |
| | | workerData: this._options.workerData, |
| | | ...this._options.forkOptions |
| | | } |
| | | ); |
| | | |
| | |
| | | _types.CHILD_MESSAGE_INITIALIZE, |
| | | false, |
| | | this._options.workerPath, |
| | | this._options.setupArgs |
| | | this._options.setupArgs, |
| | | String(this._options.workerId + 1) // 0-indexed workerId, 1-indexed JEST_WORKER_ID |
| | | ]); |
| | | |
| | | this._retries++; // If we exceeded the amount of retries, we will emulate an error reply |