test: replace string concatenation with template · nodejs/node@4243903

Original file line numberDiff line numberDiff line change

@@ -39,9 +39,10 @@ const server = http.createServer(common.mustCall(function(req, res) {

3939
4040

// Make a bunch of requests pipelined on the same socket

4141

function generator(seeds) {

42+

const port = server.address().port;

4243

return seeds.map(function(r) {

43-

return 'GET /' + r + ' HTTP/1.1\r\n' +

44-

`Host: localhost:${server.address().port}\r\n` +

44+

return `GET /${r} HTTP/1.1\r\n` +

45+

`Host: localhost:${port}\r\n` +

4546

'\r\n' +

4647

'\r\n';

4748

}).join('');