Skip to content

Commit 50d740e

Browse files
author
Eric Millin
committed
Comment formatting review fixes
1 parent c878a3a commit 50d740e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ Test.prototype.test = function (name, opts, cb) {
109109

110110
Test.prototype.comment = function () {
111111
var that = this;
112-
var keys = Object.keys(arguments)
113-
var msg = keys.length > 1 ? format.apply(null, arguments) : arguments[keys[0]];
112+
113+
var msg = arguments.length > 1 ? format.apply(null, arguments) : arguments[0];
114114

115115
trim(msg).split('\n').forEach(function (aMsg) {
116116
that.emit('result', trim(aMsg).replace(/^#\s*/, ''));

test/comment.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,4 +226,4 @@ tap.test('formatted multiline string', function (assert) {
226226
t.comment("tip\n%s\nt%s", "tap", "ape");
227227
t.end();
228228
});
229-
});
229+
});

0 commit comments

Comments
 (0)