Move afterAll reporting into Suite since that's where they're being tracked
This commit is contained in:
@@ -8,6 +8,7 @@ getJasmineRequireObj().Suite = function() {
|
||||
this.resultCallback = attrs.resultCallback || function() {};
|
||||
this.clearStack = attrs.clearStack || function(fn) {fn();};
|
||||
this.expectationFactory = attrs.expectationFactory;
|
||||
this.reportExpectationFailure = attrs.reportExpectationFailure || function() {};
|
||||
|
||||
this.beforeFns = [];
|
||||
this.afterFns = [];
|
||||
@@ -90,11 +91,11 @@ getJasmineRequireObj().Suite = function() {
|
||||
queueableFns: allFns,
|
||||
onComplete: complete,
|
||||
userContext: this.sharedUserContext(),
|
||||
onException: function() { self.onException.apply(self, arguments); },
|
||||
afterAllExpectationFailures: this.afterAllExpectationFailures
|
||||
onException: function() { self.onException.apply(self, arguments); }
|
||||
});
|
||||
|
||||
function complete() {
|
||||
self.reportAfterAllExpectationFailures();
|
||||
self.resultCallback(self.result);
|
||||
|
||||
if (onComplete) {
|
||||
@@ -107,6 +108,12 @@ 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++) {
|
||||
|
||||
Reference in New Issue
Block a user