Remove the blue color workaround for Windows (#330)

The illegible blue color has been fixed in Windows 10 build 16257: https://blogs.msdn.microsoft.com/commandline/2017/08/02/updating-the-windows-console-colors/

The workaround causes all kinds of problems, so better to remove it than adding conditionals for older Windows versions.

Fixes #329
This commit is contained in:
Sindre Sorhus 2019-03-12 20:31:33 +07:00 committed by GitHub
parent 3ef170b457
commit 2ca015c4c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 18 deletions

View file

@ -29,18 +29,6 @@ test.beforeEach(() => {
test('detect a simple term if TERM isn\'t set', t => {
delete process.env.TERM;
const chalk = importFresh('..');
t.is(chalk.blue('foo'), '\u001B[94mfoo\u001B[39m');
});
test('replace blue foreground color in cmd.exe', t => {
process.env.TERM = 'dumb';
const chalk = importFresh('..');
t.is(chalk.blue('foo'), '\u001B[94mfoo\u001B[39m');
});
test('don\'t replace blue foreground color in xterm based terminals', t => {
process.env.TERM = 'xterm-256color';
const chalk = importFresh('..');
t.is(chalk.blue('foo'), '\u001B[34mfoo\u001B[39m');
});
@ -59,5 +47,5 @@ test('apply dimmed styling on xterm compatible terminals', t => {
test('apply dimmed styling on strings of other colors', t => {
process.env.TERM = 'dumb';
const chalk = importFresh('..');
t.is(chalk.blue.dim('foo'), '\u001B[94m\u001B[2mfoo\u001B[22m\u001B[39m');
t.is(chalk.blue.dim('foo'), '\u001B[34m\u001B[2mfoo\u001B[22m\u001B[39m');
});