testing/transports/ws_transport.ts view source
(options: WsTransportOptions): Promise<WsClient> Build a real-upgrade WS client pinned to options.base_url + ws_path.
Resolves once the upgrade succeeds and the socket is in OPEN state;
rejects if the upgrade is refused (401, allowlist rejection, network
failure). Incoming messages are JSON-parsed and pushed onto the
messages array; wait_for checks already-received messages first
before waiting for new arrivals.
options
returns
Promise<WsClient> throws
Error- if the upgrade fails (status, network) — the rejection