Add failing test for #234 (#235)

This commit is contained in:
Chris Harwood 2018-09-18 04:48:47 -04:00 committed by Sindre Sorhus
parent 2a678789b1
commit 6a14c58e54
2 changed files with 27 additions and 11 deletions

16
test/no-color-support.js Normal file
View 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');
});