From 61dd74bc5dfbab6b4db50ea1dd1cc7b7d2867a30 Mon Sep 17 00:00:00 2001 From: Alexis Campailla Date: Wed, 8 Oct 2014 20:30:01 +0200 Subject: [PATCH] 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 --- test/simple/test-child-process-spawn-typeerror.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/simple/test-child-process-spawn-typeerror.js b/test/simple/test-child-process-spawn-typeerror.js index 49bc74d1a0a..4fd360a3f86 100644 --- a/test/simple/test-child-process-spawn-typeerror.js +++ b/test/simple/test-child-process-spawn-typeerror.js @@ -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;