Skip to content

Commit

Permalink
more defaul json serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Apr 20, 2022
1 parent a391a0b commit cd22c47
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/jest-haste-map/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,8 @@ export default class HasteMap extends EventEmitter {
// @ts-expect-error: assignment of a worker with custom properties.
this._worker = new Worker(require.resolve('./worker'), {
exposedMethods: ['getSha1', 'worker'],
// @ts-expect-error: option does not exist on the node 12 types
forkOptions: {serialization: 'json'},
maxRetries: 3,
numWorkers: this._options.maxWorkers,
}) as WorkerInterface;
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-reporters/src/CoverageReporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ export default class CoverageReporter extends BaseReporter {
} else {
worker = new Worker(require.resolve('./CoverageWorker'), {
exposedMethods: ['worker'],
// @ts-expect-error: option does not exist on the node 12 types
forkOptions: {serialization: 'json'},
maxRetries: 2,
numWorkers: this._globalConfig.maxWorkers,
});
Expand Down

0 comments on commit cd22c47

Please sign in to comment.