diff options
author | Edward Andrew Robinson <earobinson@gmail.com> | 2017-10-06 09:55:46 -0700 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2017-10-10 21:54:41 -0700 |
commit | 3784b2d839c4918202359ec90bed40ede553f74c (patch) | |
tree | 5922f05aa1e0edab2b587cfcfcfa9b7d2041e638 /test/parallel/test-string-decoder.js | |
parent | 5dbd32c80c39739b52a124911ef342f4cc938bdf (diff) | |
download | node-new-3784b2d839c4918202359ec90bed40ede553f74c.tar.gz |
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.js | 10 |
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); } }); |