Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Commit 61dd74b

Browse files
orangemochatrevnorris
authored andcommitted
test: fix test-child-process-spawn-typeerror
You cannot spawn 'dir' on Windows because it's not an executable. Also, some people might have 'ls' on their path on Windows, so I changed invalidCmd to something that's highly unlikely to exist. Reviewed-by: Trevor Norris <[email protected]>
1 parent 47f119c commit 61dd74b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/simple/test-child-process-spawn-typeerror.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
var spawn = require('child_process').spawn,
2323
assert = require('assert'),
2424
windows = (process.platform === 'win32'),
25-
cmd = (windows) ? 'dir' : 'ls',
26-
invalidcmd = (windows) ? 'ls' : 'dir',
25+
cmd = (windows) ? 'rundll32' : 'ls',
26+
invalidcmd = 'hopefully_you_dont_have_this_on_your_machine',
2727
invalidArgsMsg = /Incorrect value of args option/,
2828
invalidOptionsMsg = /options argument must be an object/,
2929
errors = 0;

0 commit comments

Comments
 (0)