testing/transports/ws_transport.ts view source
(options: WsTransportOptions): Promise<WsTransportClient> import {create_admitted_ws_transport} from '@fuzdev/fuz_app/testing/transports/ws_transport.js'; Open a real-upgrade WS client and round-trip heartbeat on it, so the
backend has admitted the connection by the time this resolves.
Both spines answer the upgrade handshake before the connection is registered and admitted (the credential is re-read in between), and deliver no broadcast or targeted notification to a connection still pending admission. A request is answered only once the connection is admitted, so the round trip is the one signal a client has. Suites that open a socket and then wait for a server-initiated message, or that need connections registered in a known order, open through this.
heartbeat is a protocol action, present on every WS endpoint. Its response
frame (id WS_ADMISSION_PROBE_ID) stays in the client's messages.
options
returns
Promise<WsTransportClient>
throws
Error- if the upgrade fails, or the heartbeat is refused or times out — the socket is closed first