Function
mockRegistryFetch
(body: unknown = REGISTRY_BODY, status = 200)
Source from the content-addressed store, hash-verified
| 170 | }); |
| 171 | |
| 172 | function mockRegistryFetch(body: unknown = REGISTRY_BODY, status = 200): ReturnType<typeof vi.fn> { |
| 173 | const fetchMock = vi.fn( |
| 174 | async () => |
| 175 | new Response(JSON.stringify(body), { |
| 176 | status, |
| 177 | headers: { 'Content-Type': 'application/json' }, |
| 178 | }), |
| 179 | ); |
| 180 | globalThis.fetch = fetchMock as unknown as typeof globalThis.fetch; |
| 181 | return fetchMock; |
| 182 | } |
| 183 | |
| 184 | const CATALOG_BODY = { |
| 185 | anthropic: { |
Tested by
no test coverage detected