(entries: TestListEntry[])
| 13 | } |
| 14 | |
| 15 | function mockFetchModules(entries: TestListEntry[]) { |
| 16 | const fetchMock = vi.fn<(input: RequestInfo | URL, init?: RequestInit) => Promise<Response>>() |
| 17 | fetchMock.mockResolvedValue( |
| 18 | new Response(JSON.stringify({ data: entries }), { |
| 19 | headers: { 'Content-Type': 'application/json' }, |
| 20 | status: 200 |
| 21 | }) |
| 22 | ) |
| 23 | global.fetch = fetchMock |
| 24 | } |
| 25 | |
| 26 | function manifest(id: string, overrides: Partial<WidgetManifest> = {}): WidgetManifest { |
| 27 | return { |