Skip to content

Commit

Permalink
refactor: use colors/safe (#3548)
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal authored Sep 2, 2020
1 parent 2741d98 commit ac7b73a
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions lib/reporters/base_color.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
require('colors')
const { red, yellow, green, cyan } = require('colors/safe')

function BaseColorReporter () {
this.USE_COLORS = true

this.LOG_SINGLE_BROWSER = '%s: ' + '%s'.cyan + '\n'
this.LOG_MULTI_BROWSER = '%s %s: ' + '%s'.cyan + '\n'
this.LOG_SINGLE_BROWSER = '%s: ' + cyan('%s') + '\n'
this.LOG_MULTI_BROWSER = '%s %s: ' + cyan('%s') + '\n'

this.SPEC_FAILURE = '%s %s FAILED'.red + '\n'
this.SPEC_SLOW = '%s SLOW %s: %s'.yellow + '\n'
this.ERROR = '%s ERROR'.red + '\n'
this.SPEC_FAILURE = red('%s %s FAILED') + '\n'
this.SPEC_SLOW = yellow('%s SLOW %s: %s') + '\n'
this.ERROR = red('%s ERROR') + '\n'

this.FINISHED_ERROR = ' ERROR'.red
this.FINISHED_SUCCESS = ' SUCCESS'.green
this.FINISHED_DISCONNECTED = ' DISCONNECTED'.red
this.FINISHED_ERROR = red(' ERROR')
this.FINISHED_SUCCESS = green(' SUCCESS')
this.FINISHED_DISCONNECTED = red(' DISCONNECTED')

this.X_FAILED = ' (%d FAILED)'.red
this.X_FAILED = red(' (%d FAILED)')

this.TOTAL_SUCCESS = 'TOTAL: %d SUCCESS'.green + '\n'
this.TOTAL_FAILED = 'TOTAL: %d FAILED, %d SUCCESS'.red + '\n'
this.TOTAL_SUCCESS = green('TOTAL: %d SUCCESS') + '\n'
this.TOTAL_FAILED = red('TOTAL: %d FAILED, %d SUCCESS') + '\n'
}

// PUBLISH
Expand Down

0 comments on commit ac7b73a

Please sign in to comment.