MCPcopy Create free account
hub / github.com/EvoMap/evolver / mockFetch

Function mockFetch

test/lifecycleNodeIdLegacyFallback.test.js:67–75  ·  view source on GitHub ↗
(responseFactory)

Source from the content-addressed store, hash-verified

65}
66
67function mockFetch(responseFactory) {
68 const calls = [];
69 const fn = async (url, opts) => {
70 calls.push({ url, opts });
71 return responseFactory(calls.length, opts);
72 };
73 fn.calls = calls;
74 return fn;
75}
76
77function responseFromJson({ status = 200, json = {} } = {}) {
78 return {

Calls

no outgoing calls

Tested by

no test coverage detected