Skip to content

Commit f97f6c5

Browse files
Trotttargos
authored andcommitted
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: #41332 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent d9465ae commit f97f6c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/parallel/test-stdio-pipe-stderr.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const tmpdir = require('../common/tmpdir');
44
const assert = require('assert');
55
const fs = require('fs');
66
const join = require('path').join;
7-
const spawn = require('child_process').spawnSync;
7+
const { spawnSync } = require('child_process');
88

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

2323
stream.on('open', () => {
24-
spawn(process.execPath, {
24+
spawnSync(process.execPath, {
2525
input: `require("${fakeModulePath.replace(/\\/g, '/')}")`,
2626
stdio: ['pipe', 'pipe', stream]
2727
});

0 commit comments

Comments
 (0)