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

@@ -1,6 +1,7 @@
jasmine.TrivialReporter = function(doc) {
this.document = doc || document;
this.suiteDivs = {};
this.logRunningSpecs = false;
};
jasmine.TrivialReporter.prototype.createDom = function(type, attrs, childrenVarArgs) {
@@ -115,6 +116,12 @@ jasmine.TrivialReporter.prototype.reportSuiteResults = function(suite) {
this.suiteDivs[suite.id].className += " " + status;
};
jasmine.TrivialReporter.prototype.reportSpecStarting = function(spec) {
if (this.logRunningSpecs) {
this.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...');
}
};
jasmine.TrivialReporter.prototype.reportSpecResults = function(spec) {
var results = spec.results();
var status = results.passed() ? 'passed' : 'failed';