Allow multiple arguments in base chalk object (fixes #187)

This commit is contained in:
Josh Junon 2017-07-30 22:28:44 -07:00 committed by Josh Junon
parent 0827d3b632
commit f0c0178d12
2 changed files with 8 additions and 3 deletions

View file

@ -12,6 +12,10 @@ test('don\'t add any styling when called as the base function', t => {
t.is(m('foo'), 'foo');
});
test('support multiple arguments in base function', t => {
t.is(m('hello', 'there'), 'hello there');
});
test('style string', t => {
t.is(m.underline('foo'), '\u001B[4mfoo\u001B[24m');
t.is(m.red('foo'), '\u001B[31mfoo\u001B[39m');