Updated fake test runner that shows stack traces on failure.
authorRobert Konigsberg <konigsberg@google.com>
Wed, 27 Apr 2011 20:47:08 +0000 (16:47 -0400)
committerRobert Konigsberg <konigsberg@google.com>
Wed, 27 Apr 2011 20:47:08 +0000 (16:47 -0400)
auto_tests/misc/fake-jstestdriver.js

index db53545..4849f99 100644 (file)
@@ -47,10 +47,14 @@ function TestCase(name) {
   emptyFunction.prototype.setUp = function() { };
   emptyFunction.prototype.tearDown = function() { };
   emptyFunction.prototype.runTest = function(name) {
-    this.setUp();
-    var fn = this[name];
-    fn.apply(this, []);
-    this.tearDown();
+    try {
+      this.setUp();
+      var fn = this[name];
+      fn.apply(this, []);
+      this.tearDown();
+    } catch (e) {
+      console.log(e.stack);
+    }
   };
   return emptyFunction;
 };