diff --git a/jasmine/jasmine.headless-reporter.coffee b/jasmine/jasmine.headless-reporter.coffee index 9d965ab..f362590 100644 --- a/jasmine/jasmine.headless-reporter.coffee +++ b/jasmine/jasmine.headless-reporter.coffee @@ -27,12 +27,13 @@ class jasmine.HeadlessReporter reportRunnerStarting: (runner) -> @startTime = new Date() reportSpecResults: (spec) -> - if spec.results().passed() + results = spec.results() + if results.passed() JHW.specPassed() else JHW.specFailed() failureResult = new HeadlessReporterResult(spec.getFullName()) - for result in spec.results().getItems() + for result in results.getItems() do (result) => if result.type == 'expect' and !result.passed_ @failedCount += 1 diff --git a/jasmine/jasmine.headless-reporter.js b/jasmine/jasmine.headless-reporter.js index 5170bbd..7f6947f 100644 --- a/jasmine/jasmine.headless-reporter.js +++ b/jasmine/jasmine.headless-reporter.js @@ -49,13 +49,14 @@ return this.startTime = new Date(); }; HeadlessReporter.prototype.reportSpecResults = function(spec) { - var failureResult, result, _fn, _i, _len, _ref; - if (spec.results().passed()) { + var failureResult, result, results, _fn, _i, _len, _ref; + results = spec.results(); + if (results.passed()) { return JHW.specPassed(); } else { JHW.specFailed(); failureResult = new HeadlessReporterResult(spec.getFullName()); - _ref = spec.results().getItems(); + _ref = results.getItems(); _fn = __bind(function(result) { if (result.type === 'expect' && !result.passed_) { this.failedCount += 1;