extra tests, specific benchmark, example in readme
This commit is contained in:
parent
7d238e2ebb
commit
e5ea8df1e5
5 changed files with 26 additions and 2 deletions
12
benchmark.js
12
benchmark.js
|
|
@ -47,4 +47,16 @@ suite('chalk', () => {
|
|||
bench('cached: 1 style nested non-intersecting', () => {
|
||||
chalkBgRed(blueStyledString);
|
||||
});
|
||||
|
||||
set('iterations', 10000);
|
||||
|
||||
bench('cached: 1 style template literal', () => {
|
||||
// eslint-disable-next-line no-unused-expressions
|
||||
chalkRed`the fox jumps over the lazy dog`;
|
||||
});
|
||||
|
||||
bench('cached: nested styles template literal', () => {
|
||||
// eslint-disable-next-line no-unused-expressions
|
||||
chalkRed`the fox {bold jumps} over the {underline lazy} dog`;
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue