Skip to content

Commit

Permalink
fix(launchers): Listen to the correct error event.
Browse files Browse the repository at this point in the history
Thanks @badcorporatelogo for pointing this out.
  • Loading branch information
dignifiedquire committed Jun 14, 2015
1 parent 13b2b72 commit 45a6922
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/launchers/process.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' +
Expand Down
2 changes: 1 addition & 1 deletion test/unit/launchers/process.spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 45a6922

Please sign in to comment.