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

@@ -11,7 +11,14 @@ jasmine.MultiReporter.prototype.addReporter = function(reporter) {
};
(function() {
var functionNames = ["reportRunnerStarting", "reportRunnerResults", "reportSuiteResults", "reportSpecResults", "log"];
var functionNames = [
"reportRunnerStarting",
"reportRunnerResults",
"reportSuiteResults",
"reportSpecStarting",
"reportSpecResults",
"log"
];
for (var i = 0; i < functionNames.length; i++) {
var functionName = functionNames[i];
jasmine.MultiReporter.prototype[functionName] = (function(functionName) {

View File

@@ -17,6 +17,10 @@ jasmine.Reporter.prototype.reportRunnerResults = function(runner) {
jasmine.Reporter.prototype.reportSuiteResults = function(suite) {
};
//noinspection JSUnusedLocalSymbols
jasmine.Reporter.prototype.reportSpecStarting = function(spec) {
};
//noinspection JSUnusedLocalSymbols
jasmine.Reporter.prototype.reportSpecResults = function(spec) {
};

View File

@@ -134,7 +134,8 @@ jasmine.Spec.prototype.execute = function(onComplete) {
spec.finish(onComplete);
return;
}
this.env.reporter.log('>> Jasmine Running ' + this.suite.description + ' ' + this.description + '...');
this.env.reporter.reportSpecStarting(this);
spec.env.currentSpec = spec;