MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / FakeWebSocket

Class FakeWebSocket

packages/server-e2e/test/report.test.ts:464–482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

462}
463
464class FakeWebSocket extends EventEmitter {
465 static instances: FakeWebSocket[] = [];
466
467 readonly sent: string[] = [];
468
469 constructor(readonly url: string) {
470 super();
471 FakeWebSocket.instances.push(this);
472 queueMicrotask(() => this.emit('open'));
473 }
474
475 send(data: string): void {
476 this.sent.push(data);
477 }
478
479 close(): void {
480 this.emit('close', 1000, '');
481 }
482}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected