Change to capital case Instance

This commit is contained in:
Tom Sherman 2019-01-29 20:21:17 +00:00
parent cf981e6c44
commit bb16265e48
11 changed files with 52 additions and 58 deletions

View file

@ -2,12 +2,12 @@
import chalk from '..';
// $ExpectError (Can't have typo in option name)
new chalk.instance({levl: 1});
new chalk.instance({level: 1});
new chalk.Instance({levl: 1});
new chalk.Instance({level: 1});
// $ExpectError (Option must have proper type)
new chalk.instance({enabled: 'true'});
new chalk.instance({enabled: true});
new chalk.Instance({enabled: 'true'});
new chalk.Instance({enabled: true});
// $ExpectError (Can't have typo in chalk method)
chalk.rd('foo');
@ -22,8 +22,8 @@ chalk.red.bgBlu.underline('foo');
chalk.red.bgBlue.underline('foo');
// $ExpectError (Level must be 0, 1, 2, or 3)
const badCtx = chalk.instance({level: 4});
const ctx = chalk.instance({level: 3});
const badCtx = chalk.Instance({level: 4});
const ctx = chalk.Instance({level: 3});
// $ExpectError (Can't have typo in method name)
ctx.gry('foo');
@ -41,7 +41,7 @@ chalk.enabled = true;
chalk.level = 10;
chalk.level = 1;
const chalkInstance = new chalk.instance();
const chalkInstance = new chalk.Instance();
// $ExpectError (Can't have typo in method name)
chalkInstance.blu('foo');