Skip to content

Commit

Permalink
test: increased code coverage for proxySessionHandler
Browse files Browse the repository at this point in the history
PR-URL: #23583
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
  • Loading branch information
justin0022 authored and jasnell committed Oct 17, 2018
1 parent 62c6e44 commit 4b873ee
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/parallel/test-http2-socket-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}));
Expand Down

0 comments on commit 4b873ee

Please sign in to comment.