diff options
author | Vipin Menon <vipinmv1@in.ibm.com> | 2017-11-10 13:25:07 +0530 |
---|---|---|
committer | Franziska Hinkelmann <franziska.hinkelmann@gmail.com> | 2017-11-11 10:55:00 +0100 |
commit | ef86f2c8524fd65aeda60cad45ea8e3001941cd0 (patch) | |
tree | b34d3ed8283d527ba9d1944433853e542b29786d /test | |
parent | 97bfeff084d1c035a01381249394a64ee99e8a1e (diff) | |
download | android-node-v8-ef86f2c8524fd65aeda60cad45ea8e3001941cd0.tar.gz android-node-v8-ef86f2c8524fd65aeda60cad45ea8e3001941cd0.tar.bz2 android-node-v8-ef86f2c8524fd65aeda60cad45ea8e3001941cd0.zip |
test: use template string for concatenation
PR-URL: https://github.com/nodejs/node/pull/16918
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-whatwg-url-setters.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/parallel/test-whatwg-url-setters.js b/test/parallel/test-whatwg-url-setters.js index 819a835e2c..7655e4a257 100644 --- a/test/parallel/test-whatwg-url-setters.js +++ b/test/parallel/test-whatwg-url-setters.js @@ -46,10 +46,10 @@ function runURLSettersTests(all_test_cases) { var test_cases = all_test_cases[attribute_to_be_set]; for(var i = 0, l = test_cases.length; i < l; i++) { var test_case = test_cases[i]; - var name = "Setting <" + test_case.href + ">." + attribute_to_be_set + - " = '" + test_case.new_value + "'"; + var name = `Setting <${test_case.href}>.${attribute_to_be_set}` + + ` = '${test_case.new_value}'`; if ("comment" in test_case) { - name += " " + test_case.comment; + name += ` ${test_case.comment}`; } test(function() { var url = new URL(test_case.href); @@ -57,7 +57,7 @@ function runURLSettersTests(all_test_cases) { for (var attribute in test_case.expected) { assert_equals(url[attribute], test_case.expected[attribute]) } - }, "URL: " + name) + }, `URL: ${name}`); // test(function() { // var url = document.createElement("a"); // url.href = test_case.href; @@ -93,7 +93,7 @@ startURLSettersTests() let name = `Setting <${testCase.href}>.${attributeToBeSet}` + ` = "${testCase.new_value}"`; if ('comment' in testCase) { - name += ' ' + testCase.comment; + name += ` ${testCase.comment}`; } test(function() { const url = new URL(testCase.href); @@ -101,7 +101,7 @@ startURLSettersTests() for (const attribute in testCase.expected) { assert_equals(url[attribute], testCase.expected[attribute]); } - }, 'URL: ' + name); + }, `URL: ${name}`); } } } |