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.

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]>
  • Loading branch information
Trott authored and danielleadams committed Jan 31, 2022
1 parent 00283c9 commit 5b835b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-stdio-pipe-stderr.js
Original file line number Diff line number Diff line change
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 5b835b0

Please sign in to comment.