summaryrefslogtreecommitdiff
path: root/test/parallel/test-string-decoder.js
diff options
context:
space:
mode:
authorEdward Andrew Robinson <earobinson@gmail.com>2017-10-06 09:55:46 -0700
committerRich Trott <rtrott@gmail.com>2017-10-10 21:54:41 -0700
commit3784b2d839c4918202359ec90bed40ede553f74c (patch)
tree5922f05aa1e0edab2b587cfcfcfa9b7d2041e638 /test/parallel/test-string-decoder.js
parent5dbd32c80c39739b52a124911ef342f4cc938bdf (diff)
downloadandroid-node-v8-3784b2d839c4918202359ec90bed40ede553f74c.tar.gz
android-node-v8-3784b2d839c4918202359ec90bed40ede553f74c.tar.bz2
android-node-v8-3784b2d839c4918202359ec90bed40ede553f74c.zip
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>
Diffstat (limited to 'test/parallel/test-string-decoder.js')
-rw-r--r--test/parallel/test-string-decoder.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/parallel/test-string-decoder.js b/test/parallel/test-string-decoder.js
index a137411806..f1b1147700 100644
--- a/test/parallel/test-string-decoder.js
+++ b/test/parallel/test-string-decoder.js
@@ -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);
}
});