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 2014-10-08 20:30:01 +02:00 committed by Trevor Norris
parent 47f119cabf
commit 61dd74bc5d

View File

@ -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;