Skip to content

Commit

Permalink
remove color from test title in mini reporter
Browse files Browse the repository at this point in the history
too much green when the result count is also in green

and with `todo` and `skip` tests it doesn't matter as they're shown too fast anyways
  • Loading branch information
sindresorhus committed Mar 8, 2016
1 parent 76860dd commit 9c867e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions lib/reporters/mini.js
Expand Up @@ -70,19 +70,16 @@ MiniReporter.prototype.prefix = function (str) {
};

MiniReporter.prototype._test = function (test) {
var title;
var title = test.title;

if (test.todo) {
title = colors.todo('- ' + test.title);
this.todoCount++;
} else if (test.skip) {
title = colors.skip('- ' + test.title);
this.skipCount++;
} else if (test.error) {
title = colors.error(test.title);
this.failCount++;
} else {
title = colors.pass(test.title);
this.passCount++;
}

Expand Down
4 changes: 2 additions & 2 deletions test/reporters/mini.js
Expand Up @@ -120,7 +120,7 @@ test('skipped test', function (t) {

var expectedOutput = [
' ',
' ⠋ ' + chalk.yellow('- skipped'),
' ⠋ ' + chalk.yellow('skipped'),
'',
' ' + chalk.yellow('1 skipped')
].join('\n');
Expand All @@ -140,7 +140,7 @@ test('todo test', function (t) {

var expectedOutput = [
' ',
' ⠋ ' + chalk.blue('- todo'),
' ⠋ ' + chalk.blue('todo'),
'',
' ' + chalk.blue('1 todo')
].join('\n');
Expand Down

0 comments on commit 9c867e9

Please sign in to comment.