( chunks: Array<Record<string, unknown>>, )
| 35 | new GeminiTextAdapter({ apiKey: 'test-key' }, 'gemini-2.5-pro') |
| 36 | |
| 37 | function createMockStream( |
| 38 | chunks: Array<Record<string, unknown>>, |
| 39 | ): AsyncIterable<Record<string, unknown>> { |
| 40 | return { |
| 41 | // eslint-disable-next-line @typescript-eslint/require-await |
| 42 | async *[Symbol.asyncIterator]() { |
| 43 | for (const chunk of chunks) { |
| 44 | yield chunk |
| 45 | } |
| 46 | }, |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | describe('Gemini usage extraction', () => { |
| 51 | beforeEach(() => { |
no outgoing calls
no test coverage detected