|
1 | | -require('colors') |
| 1 | +const { red, yellow, green, cyan } = require('colors/safe') |
2 | 2 |
|
3 | 3 | function BaseColorReporter () { |
4 | 4 | this.USE_COLORS = true |
5 | 5 |
|
6 | | - this.LOG_SINGLE_BROWSER = '%s: ' + '%s'.cyan + '\n' |
7 | | - this.LOG_MULTI_BROWSER = '%s %s: ' + '%s'.cyan + '\n' |
| 6 | + this.LOG_SINGLE_BROWSER = '%s: ' + cyan('%s') + '\n' |
| 7 | + this.LOG_MULTI_BROWSER = '%s %s: ' + cyan('%s') + '\n' |
8 | 8 |
|
9 | | - this.SPEC_FAILURE = '%s %s FAILED'.red + '\n' |
10 | | - this.SPEC_SLOW = '%s SLOW %s: %s'.yellow + '\n' |
11 | | - this.ERROR = '%s ERROR'.red + '\n' |
| 9 | + this.SPEC_FAILURE = red('%s %s FAILED') + '\n' |
| 10 | + this.SPEC_SLOW = yellow('%s SLOW %s: %s') + '\n' |
| 11 | + this.ERROR = red('%s ERROR') + '\n' |
12 | 12 |
|
13 | | - this.FINISHED_ERROR = ' ERROR'.red |
14 | | - this.FINISHED_SUCCESS = ' SUCCESS'.green |
15 | | - this.FINISHED_DISCONNECTED = ' DISCONNECTED'.red |
| 13 | + this.FINISHED_ERROR = red(' ERROR') |
| 14 | + this.FINISHED_SUCCESS = green(' SUCCESS') |
| 15 | + this.FINISHED_DISCONNECTED = red(' DISCONNECTED') |
16 | 16 |
|
17 | | - this.X_FAILED = ' (%d FAILED)'.red |
| 17 | + this.X_FAILED = red(' (%d FAILED)') |
18 | 18 |
|
19 | | - this.TOTAL_SUCCESS = 'TOTAL: %d SUCCESS'.green + '\n' |
20 | | - this.TOTAL_FAILED = 'TOTAL: %d FAILED, %d SUCCESS'.red + '\n' |
| 19 | + this.TOTAL_SUCCESS = green('TOTAL: %d SUCCESS') + '\n' |
| 20 | + this.TOTAL_FAILED = red('TOTAL: %d FAILED, %d SUCCESS') + '\n' |
21 | 21 | } |
22 | 22 |
|
23 | 23 | // PUBLISH |
|
0 commit comments