diff options
author | Rob Paton <rtpaton@gmail.com> | 2017-10-06 09:50:07 -0700 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2017-10-09 02:13:17 -0700 |
commit | 66a990b5edad89af6bc3c4d048f8ddc5463e80ab (patch) | |
tree | a52ecab761b80fbb5a4df83e80036984de8809d9 /test/parallel/test-http-incoming-pipelined-socket-destroy.js | |
parent | d4fbffded49b81dd599c803d1db6914c1f97bc88 (diff) | |
download | android-node-v8-66a990b5edad89af6bc3c4d048f8ddc5463e80ab.tar.gz android-node-v8-66a990b5edad89af6bc3c4d048f8ddc5463e80ab.tar.bz2 android-node-v8-66a990b5edad89af6bc3c4d048f8ddc5463e80ab.zip |
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>
Diffstat (limited to 'test/parallel/test-http-incoming-pipelined-socket-destroy.js')
-rw-r--r-- | test/parallel/test-http-incoming-pipelined-socket-destroy.js | 5 |
1 files 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(''); |