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

Class StubBroadcast

packages/server/test/snapshotService.unit.test.ts:63–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63class StubBroadcast implements IWSBroadcastServiceT {
64 readonly _serviceBrand: undefined;
65 snapshotCalls = 0;
66 inFlight: SessionSnapshotState['inFlightTurn'] = null;
67 seq = 0;
68 epoch = 'ep_test';
69
70 async getBufferedSince(): Promise<never> {
71 throw new Error('not used');
72 }
73 async getCursor(): Promise<{ seq: number; epoch: string }> {
74 return { seq: this.seq, epoch: this.epoch };
75 }
76 async getSnapshotState(): Promise<SessionSnapshotState> {
77 this.snapshotCalls++;
78 return { seq: this.seq, epoch: this.epoch, inFlightTurn: this.inFlight };
79 }
80 currentSeq(): number {
81 return this.seq;
82 }
83}
84
85class StubApprovals {
86 readonly _serviceBrand: undefined;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected