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

Function mockFetch

test/lifecycleForceUpdateTrigger.test.js:142–150  ·  view source on GitHub ↗
(responseFactory)

Source from the content-addressed store, hash-verified

140}
141
142function mockFetch(responseFactory) {
143 const calls = [];
144 const fn = async (url, opts) => {
145 calls.push({ url: String(url), opts });
146 return responseFactory(calls.length);
147 };
148 fn.calls = calls;
149 return fn;
150}
151
152function responseFromJson({ status = 200, json = {}, headers = {} } = {}) {
153 return {

Calls

no outgoing calls

Tested by

no test coverage detected