mirror of
https://github.com/flynx/colors.js.git
synced 2025-10-28 18:40:09 +00:00
used older syntax for tests for old node versions
This commit is contained in:
parent
dfe6290c88
commit
118cb0a9ec
@ -43,14 +43,12 @@ aE(s, 'yellow', 33);
|
||||
|
||||
assert.equal(s, 'string');
|
||||
|
||||
var testStringWithNewLines = s + `
|
||||
` + s;
|
||||
var testStringWithNewLines = s + '\n' + s;
|
||||
|
||||
// single style
|
||||
assert.equal(testStringWithNewLines.red, '\x1b[31m' + s + '\n' + s + '\x1b[39m');
|
||||
|
||||
var testStringWithNewLinesStyled = s.underline + `
|
||||
` + s.bold;
|
||||
var testStringWithNewLinesStyled = s.underline + '\n' + s.bold;
|
||||
|
||||
// nested styles
|
||||
assert.equal(testStringWithNewLinesStyled.red, '\x1b[31m' + '\x1b[4m' + s + '\x1b[24m' + '\n' + '\x1b[1m' + s + '\x1b[22m' + '\x1b[39m');
|
||||
|
||||
@ -40,14 +40,12 @@ aE(s, 'yellow', 33);
|
||||
|
||||
assert.equal(s, 'string');
|
||||
|
||||
var testStringWithNewLines = s + `
|
||||
` + s;
|
||||
var testStringWithNewLines = s + '\n' + s;
|
||||
|
||||
// single style
|
||||
assert.equal(colors.red(testStringWithNewLines), '\x1b[31m' + s + '\x1b[39m' + '\n' + '\x1b[31m' + s + '\x1b[39m');
|
||||
|
||||
var testStringWithNewLinesStyled = colors.underline(s) + `
|
||||
` + colors.bold(s);
|
||||
var testStringWithNewLinesStyled = colors.underline(s) + '\n' + colors.bold(s);
|
||||
|
||||
// nested styles
|
||||
assert.equal(colors.red(testStringWithNewLinesStyled), '\x1b[31m' + '\x1b[4m' + s + '\x1b[24m' + '\x1b[39m' + '\n' + '\x1b[31m' + '\x1b[1m' + s + '\x1b[22m' + '\x1b[39m');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user