Skip to content

Commit

Permalink
Always use red for regression count color
Browse files Browse the repository at this point in the history
We currently display the regression count in yellow if there are zero
regressions, and red if there are regressions.

However, in general regressions are colored red (in test output, for
example), known failures yellow, and passes/improvements green. Keeping
this consistency feels a little more clear, so change the regression
color to always be red.
  • Loading branch information
orangejulius committed Sep 29, 2017
1 parent 75c4044 commit 8a974d9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions output_generators/terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,10 @@ function prettyPrintSuiteResults( suiteResults, config, testSuites ){
console.log( 'Placeholders: ' + suiteResults.stats.placeholder.toString().cyan );

var numRegressions = suiteResults.stats.regression;
var regressionsColor = ( numRegressions > 0 ) ? 'red' : 'yellow';
var total = suiteResults.stats.pass + suiteResults.stats.fail + suiteResults.stats.regression;
var pass = total - numRegressions;

console.log( 'Regressions: ' + numRegressions.toString()[ regressionsColor ] );
console.log( 'Regressions: ' + numRegressions.toString().red);
console.log( 'Took %sms', suiteResults.stats.timeTaken );
console.log( 'Test success rate %s%%', percentageForDisplay(total,pass));

Expand Down

0 comments on commit 8a974d9

Please sign in to comment.