MCPcopy Index your code
hub / github.com/TanStack/devtools / createMockEventSourceClass

Function createMockEventSourceClass

packages/event-bus/tests/client.test.ts:39–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37}
38
39function createMockEventSourceClass() {
40 return class MockEventSource {
41 url: string
42 onmessage: any = null
43 close = vi.fn()
44 constructor(url: string) {
45 this.url = url
46 mockEventSourceInstances.push(this)
47 }
48 }
49}
50
51function createConnectingWebSocketClass() {
52 // Starts in CONNECTING state; tests flip readyState and fire onopen manually.

Callers 1

client.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected