Skip to content

Commit

Permalink
test: use spawnSync() full name in test-stdio-pipe-stderr
Browse files Browse the repository at this point in the history
test-stdio-pipe-stderr uses `spawnSync()` but renames it as `spawn()`
which can be confusing. Rename it to `spawnSync()` for
readability/maintainability.
  • Loading branch information
Trott committed Dec 26, 2021
1 parent 94c9f62 commit 62ee8ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-stdio-pipe-stderr.js
Expand Up @@ -4,7 +4,7 @@ const tmpdir = require('../common/tmpdir');
const assert = require('assert');
const fs = require('fs');
const join = require('path').join;
const spawn = require('child_process').spawnSync;
const { spawnSync } = require('child_process');

// Test that invoking node with require, and piping stderr to file,
// does not result in exception,
Expand All @@ -21,7 +21,7 @@ const stream = fs.createWriteStream(stderrOutputPath);
fs.writeFileSync(fakeModulePath, '', 'utf8');

stream.on('open', () => {
spawn(process.execPath, {
spawnSync(process.execPath, {
input: `require("${fakeModulePath.replace(/\\/g, '/')}")`,
stdio: ['pipe', 'pipe', stream]
});
Expand Down

0 comments on commit 62ee8ca

Please sign in to comment.