handle the ability to pass in variable arguments (ex.

chalk.green("it's", "over", 9000)). updated readme to show support of
variable arguments.
This commit is contained in:
Andrew Kennedy 2013-10-07 00:34:32 -04:00
parent 0133342393
commit 6bb27b7759
3 changed files with 17 additions and 3 deletions

View file

@ -29,6 +29,14 @@ describe('chalk', function () {
it('should alias gray to grey', function () {
assert.equal(chalk.grey('foo'), '\x1b[90mfoo\x1b[39m');
});
it('should support variable number of arguments', function () {
assert.equal(chalk.red('foo', 'bar'), '\x1b[31mfoo bar\x1b[39m');
});
it('should support falsy values', function () {
assert.equal(chalk.red(0), '\x1b[31m0\x1b[39m');
});
});
describe('chalk.enabled', function () {