summaryrefslogtreecommitdiff
path: root/test/parallel/test-http-client-agent.js
diff options
context:
space:
mode:
authorAditya Anand <aditya.anandmc@gmail.com>2017-05-25 17:32:47 +0530
committerRefael Ackermann <refack@gmail.com>2017-05-27 17:18:35 -0400
commit9c6427864ea41ca68f95901786fcf08738ecdd77 (patch)
tree9452033b0490473bc189b22e9a165401e02cedd6 /test/parallel/test-http-client-agent.js
parentc1a4b531fb623c0a2165e21bb13a456e8dd86037 (diff)
downloadnode-new-9c6427864ea41ca68f95901786fcf08738ecdd77.tar.gz
test: replace `indexOf` with `includes`
PR-URL: https://github.com/nodejs/node/pull/13215 Refs: https://github.com/nodejs/node/issues/12586 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Diffstat (limited to 'test/parallel/test-http-client-agent.js')
-rw-r--r--test/parallel/test-http-client-agent.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/parallel/test-http-client-agent.js b/test/parallel/test-http-client-agent.js
index 3fb647399d..1a3c099d4d 100644
--- a/test/parallel/test-http-client-agent.js
+++ b/test/parallel/test-http-client-agent.js
@@ -55,7 +55,8 @@ function request(i) {
socket.on('close', function() {
++count;
if (count < max) {
- assert.strictEqual(http.globalAgent.sockets[name].indexOf(socket), -1);
+ assert.strictEqual(http.globalAgent.sockets[name].includes(socket),
+ false);
} else {
assert(!http.globalAgent.sockets.hasOwnProperty(name));
assert(!http.globalAgent.requests.hasOwnProperty(name));