( id: string, text: string = 'hello', role: UIMessage['role'] = 'user', )
| 7 | * Build a minimal text {@link UIMessage} for tests. |
| 8 | */ |
| 9 | export function createUIMessage( |
| 10 | id: string, |
| 11 | text: string = 'hello', |
| 12 | role: UIMessage['role'] = 'user', |
| 13 | ): UIMessage { |
| 14 | return { id, role, parts: [{ type: 'text', content: text }] } |
| 15 | } |
| 16 | |
| 17 | /** |
| 18 | * Create a persistence adapter whose three methods are vitest spies. `getItem` |
no outgoing calls
no test coverage detected