Closing before and reopening the style after a line break
This commit is contained in:
parent
c2ef5b8c13
commit
ee9405d00f
2 changed files with 9 additions and 0 deletions
4
test.js
4
test.js
|
|
@ -61,6 +61,10 @@ describe('chalk', function () {
|
|||
it('don\'t output escape codes if the input is empty', function () {
|
||||
assert.equal(chalk.red(), '');
|
||||
});
|
||||
|
||||
it('line breaks should open and close colors', function () {
|
||||
assert.equal(chalk.grey('hello\nworld'), '\u001b[90mhello\u001b[39m\n\u001b[90mworld\u001b[39m');
|
||||
});
|
||||
});
|
||||
|
||||
describe('chalk on windows', function () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue