From 40ec79a125df5282bc3983771306932cf97a21b8 Mon Sep 17 00:00:00 2001 From: David Anson Date: Thu, 21 May 2020 21:10:57 -0700 Subject: [PATCH] [Tests] add test case for #519 for test.comment() in createStream/objectMode context --- test/comment.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/comment.js b/test/comment.js index 436b9908..6161b69d 100644 --- a/test/comment.js +++ b/test/comment.js @@ -175,3 +175,18 @@ tap.test('multiline string', function (assert) { t.end(); }); }); + +tap.test('comment with createStream/objectMode', function (assert) { + assert.plan(1); + + var test = tape.createHarness(); + test.createStream({ objectMode: true }).on('data', function (row) { + if (typeof row === 'string') { + assert.equal(row, 'comment message'); + } + }); + test('t.comment', function (t) { + t.comment('comment message'); + t.end(); + }); +});