Skip to content

Commit

Permalink
test: use template literals in test-string-decoder
Browse files Browse the repository at this point in the history
`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: #15884
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
earobinson authored and Trott committed Oct 11, 2017
1 parent 5dbd32c commit 3784b2d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/parallel/test-string-decoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});
Expand Down

0 comments on commit 3784b2d

Please sign in to comment.