diff --git a/benchmark.js b/benchmark.js new file mode 100644 index 0000000..dcee1e7 --- /dev/null +++ b/benchmark.js @@ -0,0 +1,20 @@ +// ran through matcha +// ./node_modules/matcha/bin/matcha benchmark.js + +var chalk = require('./index.js'); + +suite('chalk', function(){ + + bench('add colour', function(){ + chalk.red('the fox jumps over the lazy dog'); + }); + + bench('add several styles', function(){ + chalk.blue.bgRed.bold('the fox jumps over the lazy dog') ; + }); + + bench('add nested styles', function(){ + chalk.red('the fox jumps ', chalk.underline.bgBlue('over the lazy dog') + '!') ; + }); + +}); diff --git a/package.json b/package.json index 7fc8ba7..26db021 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "supports-color": "^0.2.0" }, "devDependencies": { + "matcha": "^0.5.0", "mocha": "*" } }