parent
2a678789b1
commit
6a14c58e54
2 changed files with 27 additions and 11 deletions
16
test/no-color-support.js
Normal file
16
test/no-color-support.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import test from 'ava';
|
||||
|
||||
// Spoof supports-color
|
||||
require('./_supports-color')(__dirname, {
|
||||
level: 0,
|
||||
hasBasic: false,
|
||||
has256: false,
|
||||
has16m: false
|
||||
});
|
||||
|
||||
const chalk = require('..');
|
||||
|
||||
test.failing('colors can be forced by using chalk.enabled', t => {
|
||||
chalk.enabled = true;
|
||||
t.is(chalk.green('hello'), '\u001B[32mhello\u001B[39m');
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue