From 61fbd857d7a6450a34828abd70186781a634caff Mon Sep 17 00:00:00 2001 From: Vipin Menon Date: Fri, 10 Nov 2017 13:25:07 +0530 Subject: [PATCH] test: use template string for concatenation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/16918 Reviewed-By: James M Snell Reviewed-By: Daniel Bevenius Reviewed-By: Tobias Nießen Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: Franziska Hinkelmann --- test/parallel/test-whatwg-url-setters.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/parallel/test-whatwg-url-setters.js b/test/parallel/test-whatwg-url-setters.js index 819a835e2ce347..7655e4a2578bb1 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}`); } } }