By default don't display "Jasmine Running..." console log for each spec. Re-enable by setting TrivialReporter's logRunningSpecs to true.

This commit is contained in:
Lee Byrd & Christian Williams
2010-06-24 11:10:58 -07:00
parent 2939aff80c
commit 22065fafad
7 changed files with 68 additions and 8 deletions

View File

@@ -10,11 +10,26 @@ describe("jasmine.MultiReporter", function() {
});
it("should support all the method calls that jasmine.Reporter supports", function() {
multiReporter.reportRunnerStarting();
multiReporter.reportRunnerResults();
multiReporter.reportSuiteResults();
multiReporter.reportSpecResults();
multiReporter.log();
var delegate = {};
multiReporter.addReporter(delegate);
this.addMatchers({
toDelegateMethod: function(methodName) {
delegate[methodName] = jasmine.createSpy(methodName);
this.actual[methodName]("whatever argument");
return delegate[methodName].wasCalled
&& delegate[methodName].mostRecentCall.args.length == 1
&& delegate[methodName].mostRecentCall.args[0] == "whatever argument";
}
});
expect(multiReporter).toDelegateMethod('reportRunnerStarting');
expect(multiReporter).toDelegateMethod('reportRunnerResults');
expect(multiReporter).toDelegateMethod('reportSuiteResults');
expect(multiReporter).toDelegateMethod('reportSpecStarting');
expect(multiReporter).toDelegateMethod('reportSpecResults');
expect(multiReporter).toDelegateMethod('log');
});
it("should delegate to any and all subreporters", function() {