Meta tweaks
This commit is contained in:
parent
af4a078245
commit
655653bb0c
16 changed files with 19 additions and 24 deletions
|
|
@ -1,4 +1,4 @@
|
|||
'use strict';
|
||||
const chalk = require('..');
|
||||
const chalk = require('../source');
|
||||
|
||||
console.log(chalk.hex('#ff6159')('test'));
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import test from 'ava';
|
|||
// Spoof supports-color
|
||||
require('./_supports-color')(__dirname);
|
||||
|
||||
const chalk = require('..');
|
||||
const chalk = require('../source');
|
||||
|
||||
console.log('TERM:', process.env.TERM || '[none]');
|
||||
console.log('platform:', process.platform || '[unknown]');
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import test from 'ava';
|
||||
|
||||
const chalk = require('..');
|
||||
const chalk = require('../source');
|
||||
|
||||
test('Chalk.constructor should throw an expected error', t => {
|
||||
const expectedError = t.throws(() => {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import test from 'ava';
|
|||
// Spoof supports-color
|
||||
require('./_supports-color')(__dirname);
|
||||
|
||||
const chalk = require('..');
|
||||
const chalk = require('../source');
|
||||
|
||||
test('don\'t output colors when manually disabled', t => {
|
||||
chalk.enabled = false;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import test from 'ava';
|
|||
// Spoof supports-color
|
||||
require('./_supports-color')(__dirname);
|
||||
|
||||
const chalk = require('..');
|
||||
const chalk = require('../source');
|
||||
|
||||
test('create an isolated context where colors can be disabled (by level)', t => {
|
||||
const instance = new chalk.Instance({level: 0, enabled: true});
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import execa from 'execa';
|
|||
// Spoof supports-color
|
||||
require('./_supports-color')(__dirname);
|
||||
|
||||
const chalk = require('..');
|
||||
const chalk = require('../source');
|
||||
|
||||
test('don\'t output colors when manually disabled', t => {
|
||||
const oldLevel = chalk.level;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ require('./_supports-color')(__dirname, {
|
|||
has16m: false
|
||||
});
|
||||
|
||||
const chalk = require('..');
|
||||
const chalk = require('../source');
|
||||
|
||||
test.failing('colors can be forced by using chalk.enabled', t => {
|
||||
chalk.enabled = true;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import test from 'ava';
|
|||
// Spoof supports-color
|
||||
require('./_supports-color')(__dirname);
|
||||
|
||||
const chalk = require('..');
|
||||
const chalk = require('../source');
|
||||
|
||||
test('return an empty string for an empty literal', t => {
|
||||
const instance = new chalk.Instance();
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import test from 'ava';
|
|||
// Spoof supports-color
|
||||
require('./_supports-color')(__dirname);
|
||||
|
||||
const chalk = require('..');
|
||||
const chalk = require('../source');
|
||||
|
||||
test('visible: normal output when enabled', t => {
|
||||
const instance = new chalk.Instance({level: 3, enabled: true});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue