()
| 609 | if (callCount === 1) { |
| 610 | // Candidate A: stream a chunk, then explode mid-stream. |
| 611 | async function* failingGen() { |
| 612 | await Promise.resolve(); |
| 613 | yield "partial-A-"; |
| 614 | throw new Error("candidate A fell over"); |
| 615 | } |
| 616 | return { textStream: failingGen() } as unknown as ReturnType<typeof aiSdk.streamText>; |
| 617 | } |
| 618 | // Candidate B: clean stream. |
no test coverage detected