(events: CapturedEvent[], type: T["type"])
| 32 | } |
| 33 | |
| 34 | function getCapturedEvent<T extends { type: string }>(events: CapturedEvent[], type: T["type"]): T { |
| 35 | const match = events.find((event) => event.event === type); |
| 36 | expect(match).toBeDefined(); |
| 37 | if (!match) { |
| 38 | throw new Error(`Expected captured ${type} event`); |
| 39 | } |
| 40 | return match.data as T; |
| 41 | } |
| 42 | |
| 43 | describe("streamSimulation", () => { |
| 44 | test("persists legacy mode metadata for simulated context-limit partials", async () => { |
no outgoing calls
no test coverage detected