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

@@ -2033,12 +2033,16 @@ describe("Env integration", function() {
{
passed: false,
globalErrorType: 'load',
message: 'Uncaught SyntaxError: Unexpected end of input'
message: 'Uncaught SyntaxError: Unexpected end of input',
filename: 'borkenSpec.js',
lineno: 42
},
{
passed: false,
globalErrorType: 'load',
message: 'Uncaught Error: ENOCHEESE'
message: 'Uncaught Error: ENOCHEESE',
filename: undefined,
lineno: undefined
}
]);
@@ -2046,7 +2050,7 @@ describe("Env integration", function() {
});
env.addReporter(reporter);
global.onerror('Uncaught SyntaxError: Unexpected end of input');
global.onerror('Uncaught SyntaxError: Unexpected end of input', 'borkenSpec.js', 42);
global.onerror('Uncaught Error: ENOCHEESE');
env.execute();