From 66a990b5edad89af6bc3c4d048f8ddc5463e80ab Mon Sep 17 00:00:00 2001 From: Rob Paton Date: Fri, 6 Oct 2017 09:50:07 -0700 Subject: [PATCH] test: replace string concatenation with template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/15915 Reviewed-By: Daijiro Wachi Reviewed-By: Benjamin Gruenbaum Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen Reviewed-By: Ruben Bridgewater --- test/parallel/test-http-incoming-pipelined-socket-destroy.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-http-incoming-pipelined-socket-destroy.js b/test/parallel/test-http-incoming-pipelined-socket-destroy.js index b9603a5791..7c15339785 100644 --- a/test/parallel/test-http-incoming-pipelined-socket-destroy.js +++ b/test/parallel/test-http-incoming-pipelined-socket-destroy.js @@ -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('');