Return tests results from runAllTests
authorRobert Konigsberg <konigsberg@google.com>
Thu, 29 Dec 2011 01:21:20 +0000 (20:21 -0500)
committerRobert Konigsberg <konigsberg@google.com>
Thu, 29 Dec 2011 01:21:20 +0000 (20:21 -0500)
auto_tests/misc/fake-jstestdriver.js

index 92147ca..e5db4c5 100644 (file)
@@ -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() {