File tree 3 files changed +4
-12
lines changed
3 files changed +4
-12
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
const path = require ( 'path' ) ;
3
- const chalk = require ( 'chalk' ) ;
4
3
const figures = require ( 'figures' ) ;
5
4
const convertSourceMap = require ( 'convert-source-map' ) ;
6
- const colors = require ( './colors' ) ;
7
5
8
6
function validate ( conf ) {
9
7
if ( conf === undefined || conf === null ) {
@@ -14,9 +12,9 @@ function validate(conf) {
14
12
const isValidShortcut = conf === 'default' || conf === 'inherit' ;
15
13
16
14
if ( ! conf || ( typeof conf === 'string' && ! isValidShortcut ) ) {
17
- let message = colors . error ( figures . cross ) ;
15
+ let message = figures . cross ;
18
16
message += ' Unexpected Babel configuration for AVA. ' ;
19
- message += 'See ' + chalk . underline ( ' https://github.com/avajs/ava#es2015-support' ) + ' for allowed values.';
17
+ message += 'See https://github.com/avajs/ava#es2015-support for allowed values.' ;
20
18
21
19
throw new Error ( message ) ;
22
20
}
Original file line number Diff line number Diff line change @@ -14,11 +14,6 @@ const extractStack = require('../extract-stack');
14
14
const codeExcerpt = require ( '../code-excerpt' ) ;
15
15
const colors = require ( '../colors' ) ;
16
16
17
- chalk . enabled = true ;
18
- Object . keys ( colors ) . forEach ( key => {
19
- colors [ key ] . enabled = true ;
20
- } ) ;
21
-
22
17
// TODO(@jamestalamge): This should be fixed in log-update and ansi-escapes once we are confident it's a good solution.
23
18
const CSI = '\u001b[' ;
24
19
const ERASE_LINE = CSI + '2K' ;
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ const cliPath = path.join(__dirname, '../cli.js');
17
17
18
18
// For some reason chalk is disabled by default
19
19
chalk . enabled = true ;
20
- const colors = require ( '../lib/colors' ) ;
21
20
22
21
function execCli ( args , opts , cb ) {
23
22
let dirname ;
@@ -75,8 +74,8 @@ test('disallow invalid babel config shortcuts', t => {
75
74
t . ok ( err ) ;
76
75
77
76
let expectedOutput = '\n ' ;
78
- expectedOutput += colors . error ( figures . cross ) + ' Unexpected Babel configuration for AVA.' ;
79
- expectedOutput += ' See ' + chalk . underline ( ' https://github.com/avajs/ava#es2015-support' ) + ' for allowed values.';
77
+ expectedOutput += figures . cross + ' Unexpected Babel configuration for AVA.' ;
78
+ expectedOutput += ' See https://github.com/avajs/ava#es2015-support for allowed values.' ;
80
79
expectedOutput += '\n' ;
81
80
82
81
t . is ( stderr , expectedOutput ) ;
You can’t perform that action at this time.
0 commit comments