From 45a69221703bbd043cd71b8b0934c4be5339e111 Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Sun, 14 Jun 2015 17:40:42 +0200 Subject: [PATCH] fix(launchers): Listen to the correct error event. Thanks @badcorporatelogo for pointing this out. --- lib/launchers/process.js | 2 +- test/unit/launchers/process.spec.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/launchers/process.js b/lib/launchers/process.js index 9b9401a4c..324be795c 100644 --- a/lib/launchers/process.js +++ b/lib/launchers/process.js @@ -68,7 +68,7 @@ var ProcessLauncher = function (spawn, tempDir, timer) { self._onProcessExit(code, errorOutput) }) - self._process.on('karma_error', function (err) { + self._process.on('error', function (err) { if (err.code === 'ENOENT') { self._retryLimit = -1 errorOutput = 'Can not find the binary ' + cmd + '\n\t' + diff --git a/test/unit/launchers/process.spec.coffee b/test/unit/launchers/process.spec.coffee index 65edf9a5e..ba666994d 100644 --- a/test/unit/launchers/process.spec.coffee +++ b/test/unit/launchers/process.spec.coffee @@ -70,7 +70,7 @@ describe 'launchers/process.js', -> emitter.on 'browser_process_failure', failureSpy launcher.start 'http://host:9876/' - mockSpawn._processes[0].emit 'karma_error', {code: 'ENOENT'} + mockSpawn._processes[0].emit 'error', {code: 'ENOENT'} mockSpawn._processes[0].emit 'exit', 1 mockTempDir.remove.callArg 1