Print afterAllExceptions to the console.
- Add afterAllException function to ConsoleReporter - Print the stack traces of the errors at the end of the console output [#67055730]
This commit is contained in:
@@ -176,9 +176,7 @@ describe("ConsoleReporter", function() {
|
||||
expect(onComplete).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
|
||||
describe("with color", function() {
|
||||
|
||||
it("reports that the suite has started to the console", function() {
|
||||
var reporter = new j$.ConsoleReporter({
|
||||
print: out.print,
|
||||
@@ -222,5 +220,21 @@ describe("ConsoleReporter", function() {
|
||||
|
||||
expect(out.getOutput()).toEqual("\x1B[31mF\x1B[0m");
|
||||
});
|
||||
|
||||
it("displays all afterAll exceptions", function() {
|
||||
var reporter = new j$.ConsoleReporter({
|
||||
print: out.print,
|
||||
showColors: true
|
||||
}),
|
||||
error = new Error('After All Exception'),
|
||||
anotherError = new Error('Some Other Exception');
|
||||
|
||||
reporter.afterAllException(error);
|
||||
reporter.afterAllException(anotherError);
|
||||
reporter.jasmineDone();
|
||||
|
||||
expect(out.getOutput()).toMatch(/After All Exception/);
|
||||
expect(out.getOutput()).toMatch(/Some Other Exception/);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user