Skip to content

Commit

Permalink
fix: replace colors with ansi-colors
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-agius4 committed Jan 10, 2022
1 parent d65e911 commit 54f0a7a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 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 color = require('ansi-colors');

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: ' + color.cyan('%s') + '\n'
this.LOG_MULTI_BROWSER = '%s %s: ' + color.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 = color.red('%s %s FAILED') + '\n'
this.SPEC_SLOW = color.yellow('%s SLOW %s: %s') + '\n'
this.ERROR = color.red('%s ERROR') + '\n'

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

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

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

// PUBLISH
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,10 @@
"Karol Fabjańczuk <karol.fabjanczuk@lemondemon.pl>"
],
"dependencies": {
"ansi-colors": "^4.1.1",
"bluebird": "^3.3.0",
"body-parser": "^1.16.1",
"chokidar": "^2.0.3",
"colors": "^1.1.0",
"combine-lists": "^1.0.0",
"connect": "^3.6.0",
"core-js": "^2.2.0",
Expand Down

0 comments on commit 54f0a7a

Please sign in to comment.