From c485c33a3c32804ad75b738d5f06429b4716b92b Mon Sep 17 00:00:00 2001 From: Steve Conover Date: Mon, 28 Feb 2011 14:51:03 -0800 Subject: [PATCH] skipped specs mean yellow star --- spec/suites/TrivialNodeReporterSpec.js | 70 ++++++++------------------ src/node/TrivialNodeReporter.js | 12 +++-- 2 files changed, 28 insertions(+), 54 deletions(-) diff --git a/spec/suites/TrivialNodeReporterSpec.js b/spec/suites/TrivialNodeReporterSpec.js index 67de73a..fdf06aa 100644 --- a/spec/suites/TrivialNodeReporterSpec.js +++ b/spec/suites/TrivialNodeReporterSpec.js @@ -1,31 +1,18 @@ describe("TrivialNodeReporter", function() { - function green(str) { - return '\033[32m' + str + '\033[0m'; //keep these literal. otherwise the test loses value as a test. - } - - function red(str) { - return '\033[31m' + str + '\033[0m'; - } + //keep these literal. otherwise the test loses value as a test. + function green(str) { return '\033[32m' + str + '\033[0m'; } + function red(str) { return '\033[31m' + str + '\033[0m'; } + function yellow(str) { return '\033[33m' + str + '\033[0m'; } var newline = "\n"; - var passingSpec = { - results: function(){ - return {passed:function(){return true;}}; - } - }; + var passingSpec = { results: function(){ return {passed:function(){return true;}}; } }, + failingSpec = { results: function(){ return {passed:function(){return false;}}; } }, + skippedSpec = { results: function(){ return {skipped:true}; } }; - var failingSpec = { - results: function(){ - return {passed:function(){return false;}}; - } - }; - - function repeatedlyInvoke(f, times) { - for(var i=0; i