Allow for registration of multiple Reporter with Jasmine.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
describe("MultiReporter", function() {
|
||||
it("should delegate to any and all subreporters", function() {
|
||||
var multiReporter = new jasmine.MultiReporter();
|
||||
var fakeReporter1 = jasmine.createSpyObj("fakeReporter1", ["reportSpecResults"]);
|
||||
var fakeReporter2 = jasmine.createSpyObj("fakeReporter2", ["reportSpecResults"]);
|
||||
multiReporter.addReporter(fakeReporter1);
|
||||
multiReporter.addReporter(fakeReporter2);
|
||||
|
||||
multiReporter.reportSpecResults('blah', 'foo');
|
||||
expect(fakeReporter1.reportSpecResults).wasCalledWith('blah', 'foo');
|
||||
expect(fakeReporter2.reportSpecResults).wasCalledWith('blah', 'foo');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user