Skip to content

Commit da0ff91

Browse files
committed
fix: use advanced serialization when spawning jest workers
1 parent 7367cfa commit da0ff91

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

packages/jest-runner/src/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,12 @@ export default class TestRunner {
166166

167167
const worker = new Worker(TEST_WORKER_PATH, {
168168
exposedMethods: ['worker'],
169-
forkOptions: {stdio: 'pipe'},
169+
forkOptions: {
170+
// default to advanced serialization in order to match worker threads
171+
// @ts-expect-error: option does not exist on the node 10 types
172+
serialization: 'advanced',
173+
stdio: 'pipe',
174+
},
170175
maxRetries: 3,
171176
numWorkers: this._globalConfig.maxWorkers,
172177
setupArgs: [

0 commit comments

Comments
 (0)