From 3b5818444c06a127cacc529bb04c1e3d50854bcb Mon Sep 17 00:00:00 2001 From: Jason Leyba Date: Sun, 12 Jun 2016 13:58:42 -0700 Subject: [PATCH] Fix a small typo in the doc reporter that causes mocha to crash when a test fails. --- lib/reporters/doc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/reporters/doc.js b/lib/reporters/doc.js index 01f3fdc9d9..9f5c3f8a37 100644 --- a/lib/reporters/doc.js +++ b/lib/reporters/doc.js @@ -55,7 +55,7 @@ function Doc(runner) { runner.on('fail', function(test, err) { console.log('%s
%s
', indent(), utils.escape(test.title)); - var code = utils.escape(utils.clean(test.fn.body)); + var code = utils.escape(utils.clean(test.body)); console.log('%s
%s
', indent(), code); console.log('%s
%s
', indent(), utils.escape(err)); });