Skip to content

Commit

Permalink
fix: test lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-js committed Feb 1, 2021
1 parent 246dc12 commit 40dd301
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/parallel/test-child-process-cwd.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const { spawn } = require('child_process');
// - whether the child pid is undefined or number,
// - whether the exit code equals expectCode,
// - optionally whether the trimmed stdout result matches expectData
function testCwd(options, expectPidType = 'number', expectCode = 0, expectData) {
function testCwd(options, expectPidType, expectCode = 0, expectData) {
const child = spawn(...common.pwdCommand, options);

assert.strictEqual(typeof child.pid, expectPidType);
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-child-process-exec-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ function test(fn, code, expectPidType = 'number') {
assert.strictEqual(typeof child.pid, expectPidType);
}

// with `shell: true`, expect pid (of the shell)
// With `shell: true`, expect pid (of the shell)
if (common.isWindows) {
test(child_process.exec, 1, 'number'); // Exit code of cmd.exe
} else {
test(child_process.exec, 127, 'number'); // Exit code of /bin/sh
}

// with `shell: false`, expect no pid
// With `shell: false`, expect no pid
test(child_process.execFile, 'ENOENT', 'undefined');

0 comments on commit 40dd301

Please sign in to comment.