Meta tweaks

This commit is contained in:
Sindre Sorhus 2019-07-12 13:51:07 +07:00
parent af4a078245
commit 655653bb0c
16 changed files with 19 additions and 24 deletions

View file

@ -1,4 +1,4 @@
'use strict';
const chalk = require('..');
const chalk = require('../source');
console.log(chalk.hex('#ff6159')('test'));

View file

@ -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]');

View file

@ -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(() => {

View file

@ -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;

View file

@ -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});

View file

@ -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;

View file

@ -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;

View file

@ -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();

View file

@ -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});