Davis W. Frank
2012-02-25 11:58:54 -08:00
parent c87cf71f4f
commit 4a1a2123a3
2 changed files with 24 additions and 9 deletions

View File

@@ -44,6 +44,21 @@ describe("HtmlReporter", function() {
expect(htmlReporter.specFilter(fakeSpec("not run this"))).toBeFalsy();
});
describe("running without any specs", function() {
var runner;
beforeEach(function() {
runner = env.currentRunner();
env.addReporter(htmlReporter);
});
it("should not error", function() {
var exec = function() {
runner.execute();
};
expect(exec).not.toThrow();
});
});
describe('Matcher reporting', function() {
var getResultMessageDiv = function(body) {
var divs = body.getElementsByTagName("div");

View File

@@ -24,7 +24,7 @@ jasmine.HtmlReporter = function(_doc) {
};
self.reportRunnerResults = function(runner) {
reporterView.complete();
reporterView && reporterView.complete();
};
self.reportSuiteResults = function(suite) {