test: replace string concatenation with template
PR-URL: https://github.com/nodejs/node/pull/15915 Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
parent
d4fbffded4
commit
66a990b5ed
@ -60,9 +60,10 @@ const server = http.createServer(common.mustCall(function(req, res) {
|
||||
|
||||
// Make a bunch of requests pipelined on the same socket
|
||||
function generator(seeds) {
|
||||
const port = server.address().port;
|
||||
return seeds.map(function(r) {
|
||||
return 'GET /' + r + ' HTTP/1.1\r\n' +
|
||||
`Host: localhost:${server.address().port}\r\n` +
|
||||
return `GET /${r} HTTP/1.1\r\n` +
|
||||
`Host: localhost:${port}\r\n` +
|
||||
'\r\n' +
|
||||
'\r\n';
|
||||
}).join('');
|
||||
|
Loading…
x
Reference in New Issue
Block a user