Skip to content
Permalink
Browse files

spoof supports-color

  • Loading branch information...
Qix- committed Jun 29, 2017
1 parent 18f2e7c commit 608242a4fc05bf187d4bfb33052e94e011d4b30e
Showing with 11 additions and 1 deletion.
  1. +11 −1 test.js
12 test.js
@@ -2,11 +2,21 @@
const assert = require('assert');
const importFresh = require('import-fresh');
const resolveFrom = require('resolve-from');

// Spoof supports-color
require.cache[resolveFrom(__dirname, 'supports-color')] = {
exports: {
level: 3,
hasBasic: true,
has256: true,
has16m: true
}
};

const chalk = require('.');

console.log('host TERM=', process.env.TERM || '[none]');
console.log('host platform=', process.platform || '[unknown]');
console.log('host support=', chalk.supportsColor);

describe('chalk', () => {
it('should style string', () => {

0 comments on commit 608242a

Please sign in to comment.
You can’t perform that action at this time.