From 57faed9d8f811455e1cd72e1080b56e0c55f2768 Mon Sep 17 00:00:00 2001 From: John Bintz <john@coswellproductions.com> Date: Wed, 8 Jun 2011 13:46:08 -0400 Subject: [PATCH] actually count right, total tests == total expects --- jasmine/jasmine.headless-reporter.coffee | 2 +- jasmine/jasmine.headless-reporter.js | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/jasmine/jasmine.headless-reporter.coffee b/jasmine/jasmine.headless-reporter.coffee index f362590..a2975f4 100644 --- a/jasmine/jasmine.headless-reporter.coffee +++ b/jasmine/jasmine.headless-reporter.coffee @@ -28,6 +28,7 @@ class jasmine.HeadlessReporter @startTime = new Date() reportSpecResults: (spec) -> results = spec.results() + @length += results.getItems().length if results.passed() JHW.specPassed() else @@ -41,4 +42,3 @@ class jasmine.HeadlessReporter @results.push(failureResult) reportSpecStarting: (spec) -> reportSuiteResults: (suite) -> - @length += suite.specs().length diff --git a/jasmine/jasmine.headless-reporter.js b/jasmine/jasmine.headless-reporter.js index 7f6947f..794a89f 100644 --- a/jasmine/jasmine.headless-reporter.js +++ b/jasmine/jasmine.headless-reporter.js @@ -51,6 +51,7 @@ HeadlessReporter.prototype.reportSpecResults = function(spec) { var failureResult, result, results, _fn, _i, _len, _ref; results = spec.results(); + this.length += results.getItems().length; if (results.passed()) { return JHW.specPassed(); } else { @@ -71,9 +72,7 @@ } }; HeadlessReporter.prototype.reportSpecStarting = function(spec) {}; - HeadlessReporter.prototype.reportSuiteResults = function(suite) { - return this.length += suite.specs().length; - }; + HeadlessReporter.prototype.reportSuiteResults = function(suite) {}; return HeadlessReporter; })(); }).call(this);