diff --git a/packages/rsocket-websocket-server/src/__tests__/WebsocketDuplexConnection.spec.ts b/packages/rsocket-websocket-server/src/__tests__/WebsocketDuplexConnection.spec.ts index 6092b9e..5b35681 100644 --- a/packages/rsocket-websocket-server/src/__tests__/WebsocketDuplexConnection.spec.ts +++ b/packages/rsocket-websocket-server/src/__tests__/WebsocketDuplexConnection.spec.ts @@ -199,6 +199,25 @@ describe("WebsocketDuplexConnection", function () { }); }); + describe("when open", () => { + it("declares availability as 1", () => { + // arrange + const socketStub = mock(); + const multiplexerDemultiplexer = mock< + Multiplexer & Demultiplexer & FrameHandler + >(); + const frame = mock(); + const connection = new WebsocketDuplexConnection( + socketStub, + frame, + () => multiplexerDemultiplexer + ); + + // assert + expect(connection.availability).toEqual(1); + }); + }); + // describe("send()", () => { // const setupFrame = { // type: FrameTypes.SETUP,