diff options
author | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-04-28 04:06:42 +0300 |
---|---|---|
committer | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-05-05 17:39:05 +0300 |
commit | 8b76c3e60c7b5c274c757257580a2c0faae69097 (patch) | |
tree | a9f686995887dbeb0b5c5b23c5f3188987c99b2e /test/parallel/test-path-parse-format.js | |
parent | 6bcf65d4a788a73b3c3f27d75796609f948f7885 (diff) | |
download | android-node-v8-8b76c3e60c7b5c274c757257580a2c0faae69097.tar.gz android-node-v8-8b76c3e60c7b5c274c757257580a2c0faae69097.tar.bz2 android-node-v8-8b76c3e60c7b5c274c757257580a2c0faae69097.zip |
test: reduce string concatenations
PR-URL: https://github.com/nodejs/node/pull/12735
Refs: https://github.com/nodejs/node/pull/12455
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Diffstat (limited to 'test/parallel/test-path-parse-format.js')
-rw-r--r-- | test/parallel/test-path-parse-format.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/test/parallel/test-path-parse-format.js b/test/parallel/test-path-parse-format.js index d500180943..d69aeac9da 100644 --- a/test/parallel/test-path-parse-format.js +++ b/test/parallel/test-path-parse-format.js @@ -157,12 +157,8 @@ trailingTests.forEach(function(test) { test[1].forEach(function(test) { const actual = parse(test[0]); const expected = test[1]; - const fn = `path.${os}.parse(`; - const message = fn + - JSON.stringify(test[0]) + - ')' + - '\n expect=' + JSON.stringify(expected) + - '\n actual=' + JSON.stringify(actual); + const message = `path.${os}.parse(${JSON.stringify(test[0])})\n expect=${ + JSON.stringify(expected)}\n actual=${JSON.stringify(actual)}`; const actualKeys = Object.keys(actual); const expectedKeys = Object.keys(expected); let failed = (actualKeys.length !== expectedKeys.length); @@ -176,7 +172,7 @@ trailingTests.forEach(function(test) { } } if (failed) - failures.push('\n' + message); + failures.push(`\n${message}`); }); }); assert.strictEqual(failures.length, 0, failures.join('')); |