diff --git a/lib/jasmine.js b/lib/jasmine.js index 6bc79f9..d26b253 100644 --- a/lib/jasmine.js +++ b/lib/jasmine.js @@ -1337,7 +1337,7 @@ jasmine.NestedResults.prototype.addResult = function(result) { */ jasmine.NestedResults.prototype.passed = function() { return this.passedCount === this.totalCount; -} +}; /** * Base class for pretty printing for expectation results. */ @@ -1582,7 +1582,6 @@ jasmine.Runner.prototype.finishCallback = function() { jasmine.Runner.prototype.getResults = function() { var results = new jasmine.NestedResults(); for (var i = 0; i < this.suites.length; i++) { - //TODO: FIX results.rollupCounts(this.suites[i].getResults()[0]); } return results; diff --git a/spec/suites/RunnerTest.js b/spec/suites/RunnerTest.js index e6efbd2..1a2bfd4 100644 --- a/spec/suites/RunnerTest.js +++ b/spec/suites/RunnerTest.js @@ -40,11 +40,15 @@ describe('RunnerTest', function() { env.currentRunner.execute(); - expect(env.currentRunner.suites.length).toEqual(2); // "Runner expected two suites, got " + env.currentRunner.suites.length); - expect(env.currentRunner.suites[0].getResults()[0].passed()).toEqual(true); //"Runner should have run specs in first suite"); - expect(env.currentRunner.suites[1].getResults()[0].passed()).toEqual(false); //"Runner should have run specs in second suite"); + var runnerResults = env.currentRunner.getResults(); + console.error('runnerResults', runnerResults) + expect(runnerResults.totalCount).toEqual(2); + expect(runnerResults.passedCount).toEqual(1); + expect(runnerResults.failedCount).toEqual(1); + }); + it('should ignore suites that have been x\'d', function() { env.xdescribe('one suite description', function () { env.it('should be a test', function() { diff --git a/src/NestedResults.js b/src/NestedResults.js index fab5e9b..c5fabf7 100644 --- a/src/NestedResults.js +++ b/src/NestedResults.js @@ -77,4 +77,4 @@ jasmine.NestedResults.prototype.addResult = function(result) { */ jasmine.NestedResults.prototype.passed = function() { return this.passedCount === this.totalCount; -} +}; diff --git a/src/Runner.js b/src/Runner.js index af52de3..2f5136a 100644 --- a/src/Runner.js +++ b/src/Runner.js @@ -25,7 +25,6 @@ jasmine.Runner.prototype.finishCallback = function() { jasmine.Runner.prototype.getResults = function() { var results = new jasmine.NestedResults(); for (var i = 0; i < this.suites.length; i++) { - //TODO: FIX results.rollupCounts(this.suites[i].getResults()[0]); } return results;