diff --git a/lib/runnable.js b/lib/runnable.js index 707f9559b4..64de4e9a20 100644 --- a/lib/runnable.js +++ b/lib/runnable.js @@ -45,6 +45,7 @@ module.exports = Runnable; function Runnable(title, fn) { this.title = title; this.fn = fn; + this.body = (fn || '').toString(); this.async = fn && fn.length; this.sync = !this.async; this._timeout = 2000; diff --git a/lib/test.js b/lib/test.js index b39ce42cad..a95cd31a48 100644 --- a/lib/test.js +++ b/lib/test.js @@ -22,7 +22,6 @@ function Test(title, fn) { Runnable.call(this, title, fn); this.pending = !fn; this.type = 'test'; - this.body = (fn || '').toString(); } /**