Skip to content

Commit 4d33075

Browse files
committed
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.
1 parent 85a5a2c commit 4d33075

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/parallel/test-string-decoder.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,11 @@ function test(encoding, input, expected, singleSequence) {
164164
output += decoder.end();
165165
if (output !== expected) {
166166
const message =
167-
'Expected "' + unicodeEscape(expected) + '", ' +
168-
'but got "' + unicodeEscape(output) + '"\n' +
169-
'input: ' + input.toString('hex').match(hexNumberRE) + '\n' +
170-
'Write sequence: ' + JSON.stringify(sequence) + '\n' +
171-
'Full Decoder State: ' + inspect(decoder);
167+
`Expected "${unicodeEscape(expected)}", ` +
168+
`but got "${unicodeEscape(output)}"\n ` +
169+
`input: ${input.toString('hex').match(hexNumberRE)}\n` +
170+
`Write sequence: ${JSON.stringify(sequence)}\n` +
171+
`Full Decoder State: ${inspect(decoder)}`;
172172
assert.fail(output, expected, message);
173173
}
174174
});

0 commit comments

Comments
 (0)