Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f97f6c5

Browse filesBrowse 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 <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>
1 parent d9465ae commit f97f6c5
Copy full SHA for f97f6c5

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-stdio-pipe-stderr.js
+2-2Lines changed: 2 additions & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.