Skip to content

Commit

Permalink
Merge pull request #60 from robrich/master
Browse files Browse the repository at this point in the history
Don't die if browser didn't start
  • Loading branch information
dignifiedquire committed Sep 12, 2015
2 parents a5e951a + 4c2abd0 commit e0ca1e9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ var JUnitReporter = function (baseReporterDecorator, config, logger, helper, for
var writeXmlForBrowser = function (browser) {
var outputFile = outputDir + 'TESTS-' + browser.name.replace(/ /g, '_') + '.xml'
var xmlToOutput = suites[browser.id]
if (!xmlToOutput) {
return // don't die if browser didn't start
}

pendingFileWritings++
helper.mkdirIfNotExists(outputDir, function () {
Expand Down Expand Up @@ -72,6 +75,9 @@ var JUnitReporter = function (baseReporterDecorator, config, logger, helper, for
this.onBrowserComplete = function (browser) {
var suite = suites[browser.id]
var result = browser.lastResult
if (!suite || !result) {
return // don't die if browser didn't start
}

suite.att('tests', result.total)
suite.att('errors', result.disconnected || result.error ? 1 : 0)
Expand Down

0 comments on commit e0ca1e9

Please sign in to comment.