Report AfterAll failures as they occur
There didn't seem to be a valid reason to wait until the very end to report these.
This commit is contained in:
@@ -14,7 +14,6 @@ getJasmineRequireObj().Suite = function() {
|
|||||||
this.afterFns = [];
|
this.afterFns = [];
|
||||||
this.beforeAllFns = [];
|
this.beforeAllFns = [];
|
||||||
this.afterAllFns = [];
|
this.afterAllFns = [];
|
||||||
this.afterAllExpectationFailures = [];
|
|
||||||
this.queueRunner = attrs.queueRunner || function() {};
|
this.queueRunner = attrs.queueRunner || function() {};
|
||||||
this.disabled = false;
|
this.disabled = false;
|
||||||
|
|
||||||
@@ -95,7 +94,6 @@ getJasmineRequireObj().Suite = function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function complete() {
|
function complete() {
|
||||||
self.reportAfterAllExpectationFailures();
|
|
||||||
self.resultCallback(self.result);
|
self.resultCallback(self.result);
|
||||||
|
|
||||||
if (onComplete) {
|
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() {
|
Suite.prototype.isExecutable = function() {
|
||||||
var foundActive = false;
|
var foundActive = false;
|
||||||
for(var i = 0; i < this.children.length; i++) {
|
for(var i = 0; i < this.children.length; i++) {
|
||||||
@@ -146,7 +138,7 @@ getJasmineRequireObj().Suite = function() {
|
|||||||
|
|
||||||
Suite.prototype.addExpectationResult = function () {
|
Suite.prototype.addExpectationResult = function () {
|
||||||
if(isAfterAll(this.children) && isFailure(arguments)){
|
if(isAfterAll(this.children) && isFailure(arguments)){
|
||||||
this.afterAllExpectationFailures.push(arguments[1].message);
|
this.reportExpectationFailure(arguments[1].message);
|
||||||
} else {
|
} else {
|
||||||
for (var i = 0; i < this.children.length; i++) {
|
for (var i = 0; i < this.children.length; i++) {
|
||||||
var child = this.children[i];
|
var child = this.children[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user