Skip to content

Commit 61fbd85

Browse files
vipinmenonevanlucas
authored andcommitted
test: use template string for concatenation
PR-URL: #16918 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]>
1 parent 16c6222 commit 61fbd85

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/parallel/test-whatwg-url-setters.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,18 @@ function runURLSettersTests(all_test_cases) {
4646
var test_cases = all_test_cases[attribute_to_be_set];
4747
for(var i = 0, l = test_cases.length; i < l; i++) {
4848
var test_case = test_cases[i];
49-
var name = "Setting <" + test_case.href + ">." + attribute_to_be_set +
50-
" = '" + test_case.new_value + "'";
49+
var name = `Setting <${test_case.href}>.${attribute_to_be_set}` +
50+
` = '${test_case.new_value}'`;
5151
if ("comment" in test_case) {
52-
name += " " + test_case.comment;
52+
name += ` ${test_case.comment}`;
5353
}
5454
test(function() {
5555
var url = new URL(test_case.href);
5656
url[attribute_to_be_set] = test_case.new_value;
5757
for (var attribute in test_case.expected) {
5858
assert_equals(url[attribute], test_case.expected[attribute])
5959
}
60-
}, "URL: " + name)
60+
}, `URL: ${name}`);
6161
// test(function() {
6262
// var url = document.createElement("a");
6363
// url.href = test_case.href;
@@ -93,15 +93,15 @@ startURLSettersTests()
9393
let name = `Setting <${testCase.href}>.${attributeToBeSet}` +
9494
` = "${testCase.new_value}"`;
9595
if ('comment' in testCase) {
96-
name += ' ' + testCase.comment;
96+
name += ` ${testCase.comment}`;
9797
}
9898
test(function() {
9999
const url = new URL(testCase.href);
100100
url[attributeToBeSet] = testCase.new_value;
101101
for (const attribute in testCase.expected) {
102102
assert_equals(url[attribute], testCase.expected[attribute]);
103103
}
104-
}, 'URL: ' + name);
104+
}, `URL: ${name}`);
105105
}
106106
}
107107
}

0 commit comments

Comments
 (0)