File tree Expand file tree Collapse file tree 3 files changed +4
-12
lines changed Expand file tree Collapse file tree 3 files changed +4
-12
lines changed Original file line number Diff line number Diff line change 11'use strict' ;
22const path = require ( 'path' ) ;
3- const chalk = require ( 'chalk' ) ;
43const figures = require ( 'figures' ) ;
54const convertSourceMap = require ( 'convert-source-map' ) ;
6- const colors = require ( './colors' ) ;
75
86function validate ( conf ) {
97 if ( conf === undefined || conf === null ) {
@@ -14,9 +12,9 @@ function validate(conf) {
1412 const isValidShortcut = conf === 'default' || conf === 'inherit' ;
1513
1614 if ( ! conf || ( typeof conf === 'string' && ! isValidShortcut ) ) {
17- let message = colors . error ( figures . cross ) ;
15+ let message = figures . cross ;
1816 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.' ;
2018
2119 throw new Error ( message ) ;
2220 }
Original file line number Diff line number Diff line change @@ -14,11 +14,6 @@ const extractStack = require('../extract-stack');
1414const codeExcerpt = require ( '../code-excerpt' ) ;
1515const colors = require ( '../colors' ) ;
1616
17- chalk . enabled = true ;
18- Object . keys ( colors ) . forEach ( key => {
19- colors [ key ] . enabled = true ;
20- } ) ;
21-
2217// TODO(@jamestalamge): This should be fixed in log-update and ansi-escapes once we are confident it's a good solution.
2318const CSI = '\u001b[' ;
2419const 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');
1717
1818// For some reason chalk is disabled by default
1919chalk . enabled = true ;
20- const colors = require ( '../lib/colors' ) ;
2120
2221function execCli ( args , opts , cb ) {
2322 let dirname ;
@@ -75,8 +74,8 @@ test('disallow invalid babel config shortcuts', t => {
7574 t . ok ( err ) ;
7675
7776 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.' ;
8079 expectedOutput += '\n' ;
8180
8281 t . is ( stderr , expectedOutput ) ;
You can’t perform that action at this time.
0 commit comments