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 Feb 24, 2022
1 parent 1afe39f commit 250a95d
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
Expand Up @@ -757,6 +757,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
Expand Up @@ -154,6 +154,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 250a95d

Please sign in to comment.