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:
parent
0133342393
commit
6bb27b7759
3 changed files with 17 additions and 3 deletions
8
test.js
8
test.js
|
|
@ -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 () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue