From 2ef71580ad567ad241d87cdf102772568d15f44f Mon Sep 17 00:00:00 2001 From: Aaron Peckham & Christian Williams Date: Mon, 10 Aug 2009 17:54:20 -0700 Subject: [PATCH] Color suites to reflect spec pass/fail status. --- lib/TrivialReporter.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/TrivialReporter.js b/lib/TrivialReporter.js index 5adc7a3..f51fbd6 100644 --- a/lib/TrivialReporter.js +++ b/lib/TrivialReporter.js @@ -49,6 +49,12 @@ jasmine.TrivialReporter.prototype.reportRunnerResults = function(runner) { }; jasmine.TrivialReporter.prototype.reportSuiteResults = function(suite) { + var results = suite.getResults(); + var status = results.passed() ? 'passed' : 'failed'; + if (results.totalCount == 0) { // todo: change this to check results.skipped + status = 'skipped'; + } + this.suiteDivs[suite.getFullName()].className += " " + status; }; jasmine.TrivialReporter.prototype.reportSpecResults = function(spec) {