Skip to content

Commit c136d59

Browse 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

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎test/parallel/test-cli-bad-options.js‎

Lines 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
constassert=require('assert');
7-
constspawn=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
functionrequiresArgument(option){
18-
constr=spawn(process.execPath,[option],{encoding: 'utf8'});
18+
constr=spawnSync(process.execPath,[option],{encoding: 'utf8'});
1919

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

0 commit comments

Comments
 (0)