From: Robert Konigsberg Date: Wed, 27 Apr 2011 20:47:08 +0000 (-0400) Subject: Updated fake test runner that shows stack traces on failure. X-Git-Tag: v1.0.0~513 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=ca6c43aa36919d5787a973ad3d25efea6c289130;p=dygraphs.git Updated fake test runner that shows stack traces on failure. --- diff --git a/auto_tests/misc/fake-jstestdriver.js b/auto_tests/misc/fake-jstestdriver.js index db53545..4849f99 100644 --- a/auto_tests/misc/fake-jstestdriver.js +++ b/auto_tests/misc/fake-jstestdriver.js @@ -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; };