use options hash as argument to constructor
This commit is contained in:
parent
eedf19d4ca
commit
cc4e4c429f
2 changed files with 6 additions and 4 deletions
2
test.js
2
test.js
|
|
@ -70,7 +70,7 @@ describe('chalk.enabled', function () {
|
|||
|
||||
describe('chalk.constructor', function () {
|
||||
it('should create a isolated context where colors can be disabled', function () {
|
||||
var ctx = new chalk.constructor(false);
|
||||
var ctx = new chalk.constructor({enabled: false});
|
||||
assert.equal(ctx.red('foo'), 'foo');
|
||||
assert.equal(chalk.red('foo'), '\u001b[31mfoo\u001b[39m');
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue