Skip to content

Commit 5e65069

Browse files
earobinsonMylesBorins
authored andcommitted
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: #15884 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent d2b74fe commit 5e65069

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/parallel/test-string-decoder.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,11 @@ function test(encoding, input, expected, singleSequence) {
138138
process.stdout.write('.');
139139
if (output !== expected) {
140140
const message =
141-
'Expected "' + unicodeEscape(expected) + '", ' +
142-
'but got "' + unicodeEscape(output) + '"\n' +
143-
'input: ' + input.toString('hex').match(hexNumberRE) + '\n' +
144-
'Write sequence: ' + JSON.stringify(sequence) + '\n' +
145-
'Full Decoder State: ' + inspect(decoder);
141+
`Expected "${unicodeEscape(expected)}", ` +
142+
`but got "${unicodeEscape(output)}"\n` +
143+
`input: ${input.toString('hex').match(hexNumberRE)}\n` +
144+
`Write sequence: ${JSON.stringify(sequence)}\n` +
145+
`Full Decoder State: ${inspect(decoder)}`;
146146
assert.fail(output, expected, message);
147147
}
148148
});

0 commit comments

Comments
 (0)