From 9c00faf07331c6e4a14f5cb3df58cb0252f74b51 Mon Sep 17 00:00:00 2001 From: Nicola Girardi Date: Sun, 27 Dec 2015 14:16:10 +0100 Subject: [PATCH] Multiline comments --- lib/test.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/test.js b/lib/test.js index 61ddace7..7c288bb6 100644 --- a/lib/test.js +++ b/lib/test.js @@ -102,7 +102,10 @@ Test.prototype.test = function (name, opts, cb) { }; Test.prototype.comment = function (msg) { - this.emit('result', trim(msg).replace(/^#\s*/, '')); + var that = this; + String(trim(msg)).split('\n').forEach(function (aMsg) { + that.emit('result', trim(aMsg).replace(/^#\s*/, '')); + }); }; Test.prototype.plan = function (n) {