fix missing TERM cases
This commit is contained in:
parent
3fca6150e2
commit
caeb7d8dca
2 changed files with 7 additions and 1 deletions
6
test.js
6
test.js
|
|
@ -133,6 +133,12 @@ describe('chalk on windows', () => {
|
|||
delete require.cache[resolveFrom(__dirname, 'ansi-styles')];
|
||||
});
|
||||
|
||||
it('should detect a simple term if TERM isn\'t set', () => {
|
||||
delete process.env.TERM;
|
||||
const chalkCtx = importFresh('.');
|
||||
assert.equal(chalkCtx.blue('foo'), '\u001B[94mfoo\u001B[39m');
|
||||
});
|
||||
|
||||
it('should replace blue foreground color in cmd.exe', () => {
|
||||
process.env.TERM = 'dumb';
|
||||
const chalkCtx = importFresh('.');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue