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 <trev.norris@gmail.com>
This commit is contained in:
Alexis Campailla authored and Trevor Norris committed 2014-10-09 09:38:17 -07:00
1 parent 47f119cabf
commit 61dd74bc5d
1 file changed
+2 -2
@@ -22,8 +22,8 @@
var spawn = require('child_process').spawn,
assert = require('assert'),
windows = (process.platform === 'win32'),
cmd = (windows) ? 'dir' : 'ls',
invalidcmd = (windows) ? 'ls' : 'dir',
cmd = (windows) ? 'rundll32' : 'ls',
invalidcmd = 'hopefully_you_dont_have_this_on_your_machine',
invalidArgsMsg = /Incorrect value of args option/,
invalidOptionsMsg = /options argument must be an object/,
errors = 0;