summaryrefslogtreecommitdiff
path: root/test/parallel/test-http-pipeline-flood.js
diff options
context:
space:
mode:
authorJackson Tian <shyvo1987@gmail.com>2017-01-30 16:57:49 +0800
committerItalo A. Casas <me@italoacasas.com>2017-02-01 20:06:04 -0800
commit58dc229d9aac29132cf038ed07b3b7e13b671dca (patch)
tree2b0077284bf4e1f5fa348f799dd780af37a1b93a /test/parallel/test-http-pipeline-flood.js
parent773cdc31ef3e17327d1eb0a3b92828e25457f015 (diff)
downloadandroid-node-v8-58dc229d9aac29132cf038ed07b3b7e13b671dca.tar.gz
android-node-v8-58dc229d9aac29132cf038ed07b3b7e13b671dca.tar.bz2
android-node-v8-58dc229d9aac29132cf038ed07b3b7e13b671dca.zip
test: use repeat() instead of new Array().join()
The usage of `new Array(length + 1).join(str)` is strange. Change to `str.repeat(length)` is more clearly. PR-URL: https://github.com/nodejs/node/pull/11071 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
Diffstat (limited to 'test/parallel/test-http-pipeline-flood.js')
-rw-r--r--test/parallel/test-http-pipeline-flood.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/parallel/test-http-pipeline-flood.js b/test/parallel/test-http-pipeline-flood.js
index 99e4c3e7b5..8c14af7be9 100644
--- a/test/parallel/test-http-pipeline-flood.js
+++ b/test/parallel/test-http-pipeline-flood.js
@@ -70,7 +70,7 @@ function child() {
let req = `GET / HTTP/1.1\r\nHost: localhost:${port}\r\nAccept: */*\r\n\r\n`;
- req = new Array(10241).join(req);
+ req = req.repeat(10240);
conn.on('connect', write);