diff --git a/lib/test.js b/lib/test.js index 3ba0150e..e5b351f9 100644 --- a/lib/test.js +++ b/lib/test.js @@ -109,8 +109,8 @@ Test.prototype.test = function (name, opts, cb) { Test.prototype.comment = function () { var that = this; - var keys = Object.keys(arguments) - var msg = keys.length > 1 ? format.apply(null, arguments) : arguments[keys[0]]; + + var msg = arguments.length > 1 ? format.apply(null, arguments) : arguments[0]; trim(msg).split('\n').forEach(function (aMsg) { that.emit('result', trim(aMsg).replace(/^#\s*/, '')); diff --git a/test/comment.js b/test/comment.js index d4f515f4..e8eb7503 100644 --- a/test/comment.js +++ b/test/comment.js @@ -226,4 +226,4 @@ tap.test('formatted multiline string', function (assert) { t.comment("tip\n%s\nt%s", "tap", "ape"); t.end(); }); -}); \ No newline at end of file +});