Skip to content

Commit

Permalink
test: add test for availability being 1 when done is false
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Viglucci <[email protected]>
  • Loading branch information
viglucci committed Dec 31, 2024
1 parent 6e9a41d commit 0a8f547
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,25 @@ describe("WebsocketDuplexConnection", function () {
});
});

describe("when open", () => {
it("declares availability as 1", () => {
// arrange
const socketStub = mock<Duplex>();
const multiplexerDemultiplexer = mock<
Multiplexer & Demultiplexer & FrameHandler
>();
const frame = mock<Frame>();
const connection = new WebsocketDuplexConnection(
socketStub,
frame,
() => multiplexerDemultiplexer
);

// assert
expect(connection.availability).toEqual(1);
});
});

// describe("send()", () => {
// const setupFrame = {
// type: FrameTypes.SETUP,
Expand Down

0 comments on commit 0a8f547

Please sign in to comment.