MCPcopy Create free account
hub / github.com/ZingerLittleBee/ServerBee / mockFetchModules

Function mockFetchModules

apps/web/src/widgets-runtime/loader.test.ts:15–24  ·  view source on GitHub ↗
(entries: TestListEntry[])

Source from the content-addressed store, hash-verified

13}
14
15function 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
26function manifest(id: string, overrides: Partial<WidgetManifest> = {}): WidgetManifest {
27 return {

Callers 1

loader.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected