summaryrefslogtreecommitdiff
path: root/test/parallel/test-http2-socket-proxy.js
diff options
context:
space:
mode:
authorJustin Lee <justin.lee@ubc.ca>2018-10-12 11:19:30 -0700
committerRuben Bridgewater <ruben@bridgewater.de>2018-10-15 15:33:11 +0200
commit93c918ee0cca3ef933f13842f227738eab606da8 (patch)
treec152bbcc6c878ed06d455ff09cbe7214274fd079 /test/parallel/test-http2-socket-proxy.js
parentf87e96665ef8b51c820dae1617c1db2b16f2319d (diff)
downloadandroid-node-v8-93c918ee0cca3ef933f13842f227738eab606da8.tar.gz
android-node-v8-93c918ee0cca3ef933f13842f227738eab606da8.tar.bz2
android-node-v8-93c918ee0cca3ef933f13842f227738eab606da8.zip
test: increased code coverage for proxySessionHandler
PR-URL: https://github.com/nodejs/node/pull/23583 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Diffstat (limited to 'test/parallel/test-http2-socket-proxy.js')
-rw-r--r--test/parallel/test-http2-socket-proxy.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/parallel/test-http2-socket-proxy.js b/test/parallel/test-http2-socket-proxy.js
index 17f641835d..600271fdef 100644
--- a/test/parallel/test-http2-socket-proxy.js
+++ b/test/parallel/test-http2-socket-proxy.js
@@ -92,6 +92,17 @@ server.on('stream', common.mustCall(function(stream, headers) {
stream.end();
+ // Setting socket properties sets the session properties correctly.
+ const fn = () => {};
+ socket.setTimeout = fn;
+ assert.strictEqual(session.setTimeout, fn);
+
+ socket.ref = fn;
+ assert.strictEqual(session.ref, fn);
+
+ socket.unref = fn;
+ assert.strictEqual(session.unref, fn);
+
stream.session.on('close', common.mustCall(() => {
assert.strictEqual(session.socket, undefined);
}));