test: use spawnSync() full name in test-stdio-pipe-stderr

test-stdio-pipe-stderr uses `spawnSync()` but renames it as `spawn()`
which can be confusing. Rename it to `spawnSync()` for
readability/maintainability.

PR-URL: https://github.com/nodejs/node/pull/41332
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Rich Trott authored and Danielle Adams committed 2022-01-31 23:54:23 -05:00
1 parent 9086338549
commit 404c8f5501
1 file changed
+2 -2
+2 -2
View File
@@ -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,
@@ -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]
});