Skip to content

Commit 7d4aa45

Browse files
committed
Revert "Use advanced serialization (when available) for test worker communication"
This reverts commit 51fafed.
1 parent 3868611 commit 7d4aa45

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

lib/fork.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@ const AVA_PATH = path.resolve(__dirname, '..');
1414

1515
const workerPath = require.resolve('./worker/subprocess');
1616

17-
const useAdvanced = process.versions.node >= '12.16.0';
18-
// FIXME: Fix this in api.js or cli.js.
19-
const serializeOptions = useAdvanced ?
20-
options => JSON.parse(JSON.stringify(options)) : // Use JSON serialization to remove non-clonable values.
21-
options => options;
22-
2317
module.exports = (file, options, execArgv = process.execArgv) => {
2418
let finished = false;
2519

@@ -40,8 +34,7 @@ module.exports = (file, options, execArgv = process.execArgv) => {
4034
cwd: options.projectDir,
4135
silent: true,
4236
env: {NODE_ENV: 'test', ...process.env, ...options.environmentVariables, AVA_PATH},
43-
execArgv,
44-
serialization: useAdvanced ? 'advanced' : 'json'
37+
execArgv
4538
});
4639

4740
subprocess.stdout.on('data', chunk => {
@@ -73,7 +66,7 @@ module.exports = (file, options, execArgv = process.execArgv) => {
7366
}
7467

7568
if (message.ava.type === 'ready-for-options') {
76-
send({type: 'options', options: serializeOptions(options)});
69+
send({type: 'options', options});
7770
return;
7871
}
7972

0 commit comments

Comments
 (0)