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 c136d59

Browse filesBrowse files
Trotttargos
authored andcommitted
test: use spawnSync() full name
test-cli-bad-options.js uses `spawnSync()` but renames it as `spawn()` which caused me a bit of confusion for a bit until I realized what was going on. Rename the variable `spawnSync()` for readability/maintainability. PR-URL: #41327 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 5fc886f commit c136d59
Copy full SHA for c136d59

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-cli-bad-options.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-cli-bad-options.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ require('../common');
44
// Tests that node exits consistently on bad option syntax.
55

66
const assert = require('assert');
7-
const spawn = require('child_process').spawnSync;
7+
const { spawnSync } = require('child_process');
88

99
if (process.features.inspector) {
1010
requiresArgument('--inspect-port');
@@ -15,7 +15,7 @@ if (process.features.inspector) {
1515
requiresArgument('--eval');
1616

1717
function requiresArgument(option) {
18-
const r = spawn(process.execPath, [option], { encoding: 'utf8' });
18+
const r = spawnSync(process.execPath, [option], { encoding: 'utf8' });
1919

2020
assert.strictEqual(r.status, 9);
2121

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.