(
overrides?: Partial<{
transcribe: (...args: Array<any>) => Promise<any>
}>,
)
| 511 | |
| 512 | describe('generateTranscription({ stream: true })', () => { |
| 513 | function createMockTranscriptionAdapter( |
| 514 | overrides?: Partial<{ |
| 515 | transcribe: (...args: Array<any>) => Promise<any> |
| 516 | }>, |
| 517 | ) { |
| 518 | return { |
| 519 | kind: 'transcription' as const, |
| 520 | name: 'test-transcription', |
| 521 | model: 'test-model', |
| 522 | '~types': {} as any, |
| 523 | transcribe: |
| 524 | overrides?.transcribe ?? |
| 525 | vi.fn(async () => ({ |
| 526 | id: 'txn-1', |
| 527 | model: 'test-model', |
| 528 | text: 'Hello, this is a transcription.', |
| 529 | language: 'en', |
| 530 | duration: 5.0, |
| 531 | })), |
| 532 | } |
| 533 | } |
| 534 | |
| 535 | it('should emit RUN_STARTED, CUSTOM result, and RUN_FINISHED', async () => { |
| 536 | const adapter = createMockTranscriptionAdapter() |
no outgoing calls
no test coverage detected