Skip to content

Commit 0a430b9

Browse files
cjihrigJulien Gilli
authored andcommitted
test: backport use executable in spawn() test
Backport 1070377 from the v0.12 branch. Currently, the test-child-process-spawn-typeerror.js is calling execFile() on a JavaScript source file, which is causing failures on Windows. This commit switches to calling spawn() on an actual executable. Fixes nodejs#8930. Signed-off-by: Julien Gilli <julien.gilli@joyent.com>
1 parent 31051e5 commit 0a430b9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ assert.doesNotThrow(function() { spawn(cmd, a, o); });
4141
assert.doesNotThrow(function() { spawn(cmd, o); });
4242

4343
// Variants of undefined as explicit 'no argument' at a position
44-
assert.doesNotThrow(function() { execFile(empty, u, o); });
45-
assert.doesNotThrow(function() { execFile(empty, a, u); });
46-
assert.doesNotThrow(function() { execFile(empty, n, o); });
47-
assert.doesNotThrow(function() { execFile(empty, a, n); });
44+
assert.doesNotThrow(function() { spawn(cmd, u, o); });
45+
assert.doesNotThrow(function() { spawn(cmd, a, u); });
46+
assert.doesNotThrow(function() { spawn(cmd, n, o); });
47+
assert.doesNotThrow(function() { spawn(cmd, a, n); });
4848

4949
assert.throws(function() { spawn(cmd, s); }, TypeError);
5050
assert.doesNotThrow(function() { spawn(cmd, a, s); }, TypeError);

0 commit comments

Comments
 (0)