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

Function mockFetch

test/lifecycleRateLimit.test.js:36–44  ·  view source on GitHub ↗
(responseFactory)

Source from the content-addressed store, hash-verified

34}
35
36function mockFetch(responseFactory) {
37 const calls = [];
38 const fn = async (url, opts) => {
39 calls.push({ url, opts });
40 return responseFactory(calls.length);
41 };
42 fn.calls = calls;
43 return fn;
44}
45
46function responseFromJson({ status = 200, json = {}, headers = {} } = {}) {
47 return {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected