class MockWebSocket
implements WebSocket
extends EventTarget
import { MockWebSocket } from "https://deno.land/x/lophus@0.0.13/lib/testing.ts";
Constructors
new
MockWebSocket(url?: string | URL, protocols?: string | string[])Properties
addEventListener: WebSocket["addEventListener"]
dispatchEvent: WebSocket["dispatchEvent"]
readonly
remote: MockWebSocketremoveEventListener: WebSocket["removeEventListener"]
Static Properties
readonly
first: MockWebSocket | undefinedreadonly
instances: MockWebSocket[]A list of all instances of MockWebSocket. An instance is removed from this list when it is closed.