Ideally, the websocket could be closed both explicitly, with a client.close() method, and implicitly when the client goes out of scope.
The current implementation causes an issue in jest integration tests where a test that uses WebsocketTransport will hang forever, or until the websocket times out, and there is no way to close the socket, since the client.transport.ws field is private.
Ideally, the websocket could be closed both explicitly, with a
client.close()
method, and implicitly when the client goes out of scope. The current implementation causes an issue in jest integration tests where a test that uses WebsocketTransport will hang forever, or until the websocket times out, and there is no way to close the socket, since theclient.transport.ws
field is private.