From: Robert Konigsberg Date: Thu, 29 Dec 2011 01:21:20 +0000 (-0500) Subject: Return tests results from runAllTests X-Git-Tag: v1.0.0~383^2~5 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=ca17c24972d6b2f74d62bbabbd12764e8ee45fa4;p=dygraphs.git Return tests results from runAllTests --- diff --git a/auto_tests/misc/fake-jstestdriver.js b/auto_tests/misc/fake-jstestdriver.js index 92147ca..e5db4c5 100644 --- a/auto_tests/misc/fake-jstestdriver.js +++ b/auto_tests/misc/fake-jstestdriver.js @@ -85,16 +85,16 @@ function TestCase(name) { } }; testCase.prototype.runAllTests = function() { - // what's better than for ... in for non-array objects? - var tests = {}; + var results = {}; var names = this.getTestNames(); for (var idx in names) { var name = names[idx]; console.log("Running " + name); var result = this.runTest(name); - tests[name] = result; + results[name] = result; } - console.log(prettyPrintEntity_(tests)); + console.log(prettyPrintEntity_(results)); + return results; }; testCase.prototype.getTestNames = function() {