Suites report errors in afterAlls in the suiteDone event

- remove `afterAllEvent` from reporters
This commit is contained in:
slackersoft
2014-09-03 18:52:13 -07:00
parent 6b857d11ce
commit 9402d59859
14 changed files with 306 additions and 203 deletions

View File

@@ -130,7 +130,7 @@ describe("New HtmlReporter", function() {
});
});
describe("when there are afterAllEvents", function () {
describe("when there are suite failures", function () {
it("displays the exceptions in their own alert bars", function(){
var env = new j$.Env(),
container = document.createElement("div"),
@@ -140,15 +140,13 @@ describe("New HtmlReporter", function() {
getContainer: getContainer,
createElement: function() { return document.createElement.apply(document, arguments); },
createTextNode: function() { return document.createTextNode.apply(document, arguments); }
}),
error = new Error('My After All Exception'),
otherError = new Error('My Other Exception');
});
reporter.initialize();
reporter.jasmineStarted({});
reporter.afterAllEvent(error);
reporter.afterAllEvent(otherError);
reporter.suiteDone({ failedExpectations: [{ message: 'My After All Exception' }] });
reporter.suiteDone({ failedExpectations: [{ message: 'My Other Exception' }] });
reporter.jasmineDone({});
var alertBars = container.querySelectorAll(".alert .bar");