chalk/test/no-color-support.js
Chris Harwood 9756f160ba
Add failing test for #234
* Change .gitignore to support IntellJ IDEs
* Change .gitignore to specify that node_modules and coverage are folders
* Modify supports-color mock to allow export override
* Add failing test showing that enabled does not work
2018-03-23 12:43:52 -04:00

16 lines
319 B
JavaScript

import test from 'ava';
// Spoof supports-color
require('./_supports-color')(__dirname, {
level: 0,
hasBasic: false,
has256: false,
has16m: false
});
const m = require('..');
test.failing('can be forced on using chalk.enabled', t => {
m.enabled = true;
t.is(m.green('hello'), '\u001B[32mhello\u001B[39m');
});