Improved reporting of load errors and afterAll errors

- Pass file and line number to reporters when present
- Show file and line number in the HTML reporter when present
- Visually separate adjacent errors in the HTML reporter

[#24901981]
This commit is contained in:
Steve Gravrock
2017-11-04 10:28:42 -07:00
parent ae9b95269c
commit 82eeed3c85
8 changed files with 79 additions and 25 deletions

View File

@@ -93,12 +93,14 @@ getJasmineRequireObj().Env = function(j$) {
var globalErrors = new j$.GlobalErrors();
globalErrors.install();
globalErrors.pushListener(function(message) {
globalErrors.pushListener(function(message, filename, lineno) {
if (!suppressLoadErrors) {
topSuite.result.failedExpectations.push({
passed: false,
globalErrorType: 'load',
message: message
message: message,
filename: filename,
lineno: lineno
});
}
});