MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / addWebSocket

Function addWebSocket

services/session-ingest/src/dos/UserConnectionDO.test.ts:168–177  ·  view source on GitHub ↗

Create a web WebSocket and add it to the context.

(
  mockCtx: ReturnType<typeof createMockCtx>,
  connectionId = 'web-1',
  subscribedSessions: string[] = []
)

Source from the content-addressed store, hash-verified

166 };
167}
168
169/** Drain microtasks so waitUntil-scheduled async IIFEs settle. */
170async function flushAsync(): Promise<void> {
171 await new Promise<void>(resolve => {
172 setTimeout(resolve, 0);
173 });
174 await new Promise<void>(resolve => {
175 setTimeout(resolve, 0);
176 });
177}
178
179// ---------------------------------------------------------------------------
180// Helpers

Callers 1

Calls 1

createMockWsFunction · 0.85

Tested by

no test coverage detected