From 5e65069289f48f1a742e5687e8d0084aba9a28cc Mon Sep 17 00:00:00 2001 From: Edward Andrew Robinson Date: Fri, 6 Oct 2017 09:55:46 -0700 Subject: [PATCH] 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 Reviewed-By: James M Snell --- test/parallel/test-string-decoder.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-string-decoder.js b/test/parallel/test-string-decoder.js index b9fa47da52bc42..534bfd097499a7 100644 --- a/test/parallel/test-string-decoder.js +++ b/test/parallel/test-string-decoder.js @@ -138,11 +138,11 @@ function test(encoding, input, expected, singleSequence) { process.stdout.write('.'); 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); } });