Close #92 PR: Closing before and reopening the style after a line break.

This commit is contained in:
Martin Heidegger 2016-01-17 12:35:27 +01:00 committed by Sindre Sorhus
parent 139f8b68cc
commit 05f87e25e1
2 changed files with 9 additions and 0 deletions

View file

@ -68,6 +68,10 @@ describe('chalk', function () {
assert.equal(chalk.reset(chalk.red.bgGreen.underline.bind(null)('foo') + 'foo'), '\u001b[0m\u001b[31m\u001b[42m\u001b[4mfoo\u001b[24m\u001b[49m\u001b[39mfoo\u001b[0m');
assert.equal(chalk.red.blue.black.call(null), '');
});
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 () {