Skip to content

Commit

Permalink
Work around karma-runner#20
Browse files Browse the repository at this point in the history
  • Loading branch information
rbierman committed Jul 13, 2016
1 parent 5a68273 commit adfd2ed
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 @@ -117,6 +117,9 @@ var JUnitReporter = function (baseReporterDecorator, config, logger, helper, for
}

this.onBrowserComplete = function (browser) {
// work around https://github.com/karma-runner/karma-junit-reporter/issues/20
if (!suites) return;

var suite = suites[browser.id]
var result = browser.lastResult
if (!suite || !result) {
Expand All @@ -140,6 +143,9 @@ var JUnitReporter = function (baseReporterDecorator, config, logger, helper, for
}

this.specSuccess = this.specSkipped = this.specFailure = function (browser, result) {
// work around https://github.com/karma-runner/karma-junit-reporter/issues/20
if (!suites || !suites[browser.id]) return;

var testsuite = suites[browser.id]

if (!testsuite) {
Expand Down

0 comments on commit adfd2ed

Please sign in to comment.