diff options
Diffstat (limited to 'test/parallel/test-child-process-exec-error.js')
-rw-r--r-- | test/parallel/test-child-process-exec-error.js | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/test/parallel/test-child-process-exec-error.js b/test/parallel/test-child-process-exec-error.js index 416eb16514..006a2eebb9 100644 --- a/test/parallel/test-child-process-exec-error.js +++ b/test/parallel/test-child-process-exec-error.js @@ -4,17 +4,10 @@ var assert = require('assert'); var child_process = require('child_process'); function test(fun, code) { - var errors = 0; - - fun('does-not-exist', function(err) { + fun('does-not-exist', common.mustCall(function(err) { assert.equal(err.code, code); assert(/does\-not\-exist/.test(err.cmd)); - errors++; - }); - - process.on('exit', function() { - assert.equal(errors, 1); - }); + })); } if (common.isWindows) { |