From a445a62e7ca295bc38a4fb6f2dee8f8f35534daf Mon Sep 17 00:00:00 2001 From: "Davis W. Frank" Date: Mon, 16 May 2011 18:28:46 -0700 Subject: [PATCH] TrivialConsoleReporter now reports the correct number of specs that were executed. TCR is still very heavily mocked instead of using testing an actual Jasmine environment. But now at least the numbers are correct. --- spec/node_suite.js | 85 ++++----- spec/suites/TrivialConsoleReporterSpec.js | 84 ++++++--- src/console/TrivialConsoleReporter.js | 211 +++++++++++++--------- 3 files changed, 229 insertions(+), 151 deletions(-) diff --git a/spec/node_suite.js b/spec/node_suite.js index 9d7f7bc..1e61804 100644 --- a/spec/node_suite.js +++ b/spec/node_suite.js @@ -6,24 +6,26 @@ var path = require('path'); // undefined = "diz be undefined yo"; var jasmineGlobals = require("../src/base"); -for(var k in jasmineGlobals) {global[k] = jasmineGlobals[k];} +for (var k in jasmineGlobals) { + global[k] = jasmineGlobals[k]; +} //load jasmine src files based on the order in runner.html var srcFilesInProperRequireOrder = []; var runnerHtmlLines = fs.readFileSync("spec/runner.html", "utf8").split("\n"); var srcFileLines = []; -for (var i=0; i 0 && spec.description) suiteResult.failedSpecResults.push(spec); }); - + this.suiteResults.push(suiteResult); }; - + function eachSpecFailure(suiteResults, callback) { - for(var i=0; i