mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
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:
1 parent
9086338549
commit
404c8f5501
1 file changed
+2
-2
@@ -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]
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user