Skip to content

Commit e9cb25d

Browse files
Juan Sotosindresorhus
authored andcommitted
Close #494 PR: Return empty string instead of null for a single anonymous test. Fixes #487
1 parent 93af8d8 commit e9cb25d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/reporters/verbose.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ VerboseReporter.prototype.test = function (test) {
2626
}
2727

2828
if (this.api.fileCount === 1 && this.api.testCount === 1 && test.title === '[anonymous]') {
29-
return null;
29+
return undefined;
3030
}
3131

3232
// display duration only over a threshold

test/reporters/verbose.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ test('don\'t display test title if there is only one anonymous test', function (
7070
title: '[anonymous]'
7171
});
7272

73-
t.is(output, null);
73+
t.is(output, undefined);
7474
t.end();
7575
});
7676

0 commit comments

Comments
 (0)