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

Function mockFetch

test/lifecycleNodeIdUnification.test.js:92–100  ·  view source on GitHub ↗
(responseFactory)

Source from the content-addressed store, hash-verified

90}
91
92function mockFetch(responseFactory) {
93 const calls = [];
94 const fn = async (url, opts) => {
95 calls.push({ url, opts });
96 return responseFactory(calls.length, opts);
97 };
98 fn.calls = calls;
99 return fn;
100}
101
102function responseFromJson({ status = 200, json = {} } = {}) {
103 return {

Calls

no outgoing calls

Tested by

no test coverage detected