Skip to content

Commit

Permalink
test: replace concatenation with literals
Browse files Browse the repository at this point in the history
PR-URL: #15924
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
jphblais authored and MylesBorins committed Oct 23, 2017
1 parent a87b202 commit fe84f3c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/parallel/test-whatwg-url-searchparams-sort.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@ const { test, assert_equals, assert_array_equals } = require('../common/wpt');
assert_array_equals(param, val.output[i])
i++
}
}, "Parse and sort: " + val.input)
}, `Parse and sort: ${val.input}`)

test(() => {
let url = new URL("?" + val.input, "https://example/")
let url = new URL(`?${val.input}`, "https://example/")
url.searchParams.sort()
let params = new URLSearchParams(url.search),
i = 0
for(let param of params) {
assert_array_equals(param, val.output[i])
i++
}
}, "URL parse and sort: " + val.input)
}, `URL parse and sort: ${val.input}`)
})

test(function() {
Expand Down Expand Up @@ -90,7 +90,7 @@ tests.forEach((val) => {
assert_array_equals(param, val.output[i]);
i++;
}
}, 'Parse and sort: ' + val.input);
}, `Parse and sort: ${val.input}`);

test(() => {
const url = new URL(`?${val.input}`, 'https://example/');
Expand All @@ -101,5 +101,5 @@ tests.forEach((val) => {
assert_array_equals(param, val.output[i]);
i++;
}
}, 'URL parse and sort: ' + val.input);
}, `URL parse and sort: ${val.input}`);
});

0 comments on commit fe84f3c

Please sign in to comment.