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

Function mockFetch

test/lifecycleLastUpdateAck.test.js:65–73  ·  view source on GitHub ↗
(responseFactory)

Source from the content-addressed store, hash-verified

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

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected