used older syntax for tests for old node versions

This commit is contained in:
Josh Pike 2018-04-26 15:59:18 +07:00
parent dfe6290c88
commit 118cb0a9ec
2 changed files with 4 additions and 8 deletions

View File

@ -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');

View File

@ -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');