Minimal WebSocket surface the transport depends on. The global WebSocket
constructor (browsers, and Node's built-in client since Node 22) already
satisfies this; pass webSocketFactory to supply a polyfill or a mock in
tests without adding a runtime dependency.
Minimal WebSocket surface the transport depends on. The global
WebSocketconstructor (browsers, and Node's built-in client since Node 22) already satisfies this; passwebSocketFactoryto supply a polyfill or a mock in tests without adding a runtime dependency.