From f7a42fc77647cc57d7f8077af56e10366cc24c10 Mon Sep 17 00:00:00 2001 From: "Daniel St. Jules" Date: Tue, 16 Feb 2016 18:21:16 -0800 Subject: [PATCH] Fix hook error in browser reporter by moving body prop from test to runnable --- lib/runnable.js | 1 + lib/test.js | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/runnable.js b/lib/runnable.js index 9ac45de3f8..f8a2af722b 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(); } /**