chalk/test/no-color-support.js
2019-07-12 14:13:02 +07:00

16 lines
345 B
JavaScript

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