extra tests, specific benchmark, example in readme

This commit is contained in:
Toon Baeyens 2020-05-06 15:24:58 +02:00
parent 7d238e2ebb
commit e5ea8df1e5
5 changed files with 26 additions and 2 deletions

View file

@ -154,6 +154,11 @@ expectType<string>(chalk.bgWhiteBright`foo`);
expectType<string>(chalk.red.bgGreen.underline('foo'));
expectType<string>(chalk.underline.red.bgGreen('foo'));
// -- Complex template literal --
expectType<string>(chalk.underline``);
expectType<string>(chalk.red.bgGreen.bold`Hello {italic.blue ${name}}`);
expectType<string>(chalk.strikethrough.cyanBright.bgBlack`Works with {reset {bold numbers}} {bold.red ${1}}`);
// -- Color types ==
expectType<typeof chalk.Color>('red');
expectError<typeof chalk.Color>('hotpink');