summaryrefslogtreecommitdiff
path: root/test/parallel/test-http-keep-alive.js
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2020-12-06 14:52:08 +0100
committerMichaël Zasso <targos@protonmail.com>2020-12-13 22:16:18 +0100
commit2ef9a76ece1e403d1dd7019fceb8f258607e7a69 (patch)
tree48f8fb044729f5fa4cb535aa4182d5c059a55654 /test/parallel/test-http-keep-alive.js
parentc6c83374028c44d280dd7eaa767348eaee3b9502 (diff)
downloadnode-new-2ef9a76ece1e403d1dd7019fceb8f258607e7a69.tar.gz
http: use objects with null prototype in Agent
Fixes: https://github.com/nodejs/node/issues/36364 PR-URL: https://github.com/nodejs/node/pull/36409 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'test/parallel/test-http-keep-alive.js')
-rw-r--r--test/parallel/test-http-keep-alive.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parallel/test-http-keep-alive.js b/test/parallel/test-http-keep-alive.js
index 42d534e8e6..bd075230d1 100644
--- a/test/parallel/test-http-keep-alive.js
+++ b/test/parallel/test-http-keep-alive.js
@@ -59,7 +59,7 @@ server.listen(0, common.mustCall(function() {
}, common.mustCall((response) => {
response.on('end', common.mustCall(() => {
assert.strictEqual(agent.sockets[name].length, 1);
- assert(!agent.requests.hasOwnProperty(name));
+ assert(!(name in agent.requests));
server.close();
}));
response.resume();
@@ -67,6 +67,6 @@ server.listen(0, common.mustCall(function() {
}));
process.on('exit', () => {
- assert(!agent.sockets.hasOwnProperty(name));
- assert(!agent.requests.hasOwnProperty(name));
+ assert(!(name in agent.sockets));
+ assert(!(name in agent.requests));
});