Skip to content

Commit

Permalink
fix: use advanced serialization when spawning jest workers
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Dec 28, 2020
1 parent 7367cfa commit da0ff91
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/jest-runner/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,12 @@ export default class TestRunner {

const worker = new Worker(TEST_WORKER_PATH, {
exposedMethods: ['worker'],
forkOptions: {stdio: 'pipe'},
forkOptions: {
// default to advanced serialization in order to match worker threads
// @ts-expect-error: option does not exist on the node 10 types
serialization: 'advanced',
stdio: 'pipe',
},
maxRetries: 3,
numWorkers: this._globalConfig.maxWorkers,
setupArgs: [
Expand Down

0 comments on commit da0ff91

Please sign in to comment.