Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: increased code coverage for proxySessionHandler
  • Loading branch information
justin0022 committed Oct 12, 2018
commit 80d047888c04592e330b73c2807065eb304b8fe5
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