Skip to content

Commit

Permalink
[Fix] make tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Sep 23, 2022
1 parent 7694712 commit 90a49a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ module.exports = function (opts) {
}

var fmt = '\r %s \x1b[1m\x1b[' + c + 'm%d\x1b[0m %s\x1b[K';
var str = sprintf(fmt, ok, res.number, trimWidth(res.name, res.ok));
var str = sprintf(fmt, ok, res.number, res.name);

if (!res.ok) {
var y = ++test.offset + 1;
Expand Down
4 changes: 2 additions & 2 deletions test/long-message/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ function checkFormatting(t, name, expectedExcerpt) {
}

test('A long successful assertion message should be cut.', function (t) {
checkFormatting(t, 'succeeded', 'should start with "Unrecogn...');
checkFormatting(t, 'succeeded', 'should start with "Unrecogn');
});

test('A long failed assertion message should be cut.', function (t) {
checkFormatting(t, 'failed', 'should start with "Unre...');
checkFormatting(t, 'failed', 'should start with "Unre');
});

0 comments on commit 90a49a2

Please sign in to comment.