Skip to content

Commit

Permalink
Close #494 PR: Return empty string instead of null for a single anony…
Browse files Browse the repository at this point in the history
…mous test. Fixes #487
  • Loading branch information
Juan Soto authored and sindresorhus committed Feb 13, 2016
1 parent 93af8d8 commit e9cb25d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/reporters/verbose.js
Expand Up @@ -26,7 +26,7 @@ VerboseReporter.prototype.test = function (test) {
}

if (this.api.fileCount === 1 && this.api.testCount === 1 && test.title === '[anonymous]') {
return null;
return undefined;
}

// display duration only over a threshold
Expand Down
2 changes: 1 addition & 1 deletion test/reporters/verbose.js
Expand Up @@ -70,7 +70,7 @@ test('don\'t display test title if there is only one anonymous test', function (
title: '[anonymous]'
});

t.is(output, null);
t.is(output, undefined);
t.end();
});

Expand Down

0 comments on commit e9cb25d

Please sign in to comment.