Report loading errors as loading errors, not afterAll errors

[#24901981]
This commit is contained in:
Steve Gravrock
2017-11-01 13:42:15 -07:00
parent 7b8edcb401
commit 26a7bc6acf
7 changed files with 79 additions and 11 deletions

View File

@@ -97,6 +97,7 @@ getJasmineRequireObj().Env = function(j$) {
if (!suppressLoadErrors) {
topSuite.result.failedExpectations.push({
passed: false,
globalErrorType: 'load',
message: message
});
}

View File

@@ -119,7 +119,13 @@ getJasmineRequireObj().Suite = function(j$) {
actual: '',
error: arguments[0]
};
this.result.failedExpectations.push(this.expectationResultFactory(data));
var failedExpectation = this.expectationResultFactory(data);
if (!this.parentSuite) {
failedExpectation.globalErrorType = 'afterAll';
}
this.result.failedExpectations.push(failedExpectation);
} else {
for (var i = 0; i < this.children.length; i++) {
var child = this.children[i];