test: use template literals in test-string-decoder
`test/parallel/test-string-decoder.js` used to use string concatenation this was migrated to use template literals. When concatenation involved a newline we kept string concatenation, or to keep below 80 charters per line. PR-URL: https://github.com/nodejs/node/pull/15884 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
5dbd32c80c
commit
3784b2d839
@ -164,11 +164,11 @@ function test(encoding, input, expected, singleSequence) {
|
||||
output += decoder.end();
|
||||
if (output !== expected) {
|
||||
const message =
|
||||
'Expected "' + unicodeEscape(expected) + '", ' +
|
||||
'but got "' + unicodeEscape(output) + '"\n' +
|
||||
'input: ' + input.toString('hex').match(hexNumberRE) + '\n' +
|
||||
'Write sequence: ' + JSON.stringify(sequence) + '\n' +
|
||||
'Full Decoder State: ' + inspect(decoder);
|
||||
`Expected "${unicodeEscape(expected)}", ` +
|
||||
`but got "${unicodeEscape(output)}"\n` +
|
||||
`input: ${input.toString('hex').match(hexNumberRE)}\n` +
|
||||
`Write sequence: ${JSON.stringify(sequence)}\n` +
|
||||
`Full Decoder State: ${inspect(decoder)}`;
|
||||
assert.fail(output, expected, message);
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user