diff options
author | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-06-15 03:33:50 +0300 |
---|---|---|
committer | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-06-18 03:57:32 +0300 |
commit | d174e44c77c6330c98f6d5c3bc24782d0e25f529 (patch) | |
tree | 47e8344dd434f272c4183ffec1524e8beb62855b /test/parallel/test-http-full-response.js | |
parent | 3ad90a4ac8aefad4c5d73fc0607649bf2e2f9cfa (diff) | |
download | node-new-d174e44c77c6330c98f6d5c3bc24782d0e25f529.tar.gz |
test: remove needless RegExp flags
* /m is needless if ^ and $ are not used
* /g is needless in split()
* /g is needless in test() with one-time RegExp/String
PR-URL: https://github.com/nodejs/node/pull/13690
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel/test-http-full-response.js')
-rw-r--r-- | test/parallel/test-http-full-response.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/parallel/test-http-full-response.js b/test/parallel/test-http-full-response.js index 6d81f967f4..dc52a5bc2f 100644 --- a/test/parallel/test-http-full-response.js +++ b/test/parallel/test-http-full-response.js @@ -42,7 +42,7 @@ function runAb(opts, callback) { const command = `ab ${opts} http://127.0.0.1:${server.address().port}/`; exec(command, function(err, stdout, stderr) { if (err) { - if (/ab|apr/mi.test(stderr)) { + if (/ab|apr/i.test(stderr)) { common.skip(`problem spawning \`ab\`.\n${stderr}`); process.reallyExit(0); } @@ -50,13 +50,13 @@ function runAb(opts, callback) { return; } - let m = /Document Length:\s*(\d+) bytes/mi.exec(stdout); + let m = /Document Length:\s*(\d+) bytes/i.exec(stdout); const documentLength = parseInt(m[1]); - m = /Complete requests:\s*(\d+)/mi.exec(stdout); + m = /Complete requests:\s*(\d+)/i.exec(stdout); const completeRequests = parseInt(m[1]); - m = /HTML transferred:\s*(\d+) bytes/mi.exec(stdout); + m = /HTML transferred:\s*(\d+) bytes/i.exec(stdout); const htmlTransfered = parseInt(m[1]); assert.strictEqual(bodyLength, documentLength); |