From 5b6edff3fdb59aaac1da9df60fee9273a50ff723 Mon Sep 17 00:00:00 2001 From: Greg Cobb and Tim Jarratt Date: Wed, 27 Aug 2014 14:01:28 -0700 Subject: [PATCH] Report AfterAll failures as they occur There didn't seem to be a valid reason to wait until the very end to report these. --- src/core/Suite.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/core/Suite.js b/src/core/Suite.js index a21731c2..d838328c 100644 --- a/src/core/Suite.js +++ b/src/core/Suite.js @@ -14,7 +14,6 @@ getJasmineRequireObj().Suite = function() { this.afterFns = []; this.beforeAllFns = []; this.afterAllFns = []; - this.afterAllExpectationFailures = []; this.queueRunner = attrs.queueRunner || function() {}; this.disabled = false; @@ -95,7 +94,6 @@ getJasmineRequireObj().Suite = function() { }); function complete() { - self.reportAfterAllExpectationFailures(); self.resultCallback(self.result); if (onComplete) { @@ -108,12 +106,6 @@ getJasmineRequireObj().Suite = function() { } }; - Suite.prototype.reportAfterAllExpectationFailures = function() { - while (this.afterAllExpectationFailures.length) { - this.reportExpectationFailure(this.afterAllExpectationFailures.pop()); - } - }; - Suite.prototype.isExecutable = function() { var foundActive = false; for(var i = 0; i < this.children.length; i++) { @@ -146,7 +138,7 @@ getJasmineRequireObj().Suite = function() { Suite.prototype.addExpectationResult = function () { if(isAfterAll(this.children) && isFailure(arguments)){ - this.afterAllExpectationFailures.push(arguments[1].message); + this.reportExpectationFailure(arguments[1].message); } else { for (var i = 0; i < this.children.length; i++) { var child = this.children[i];