MCPcopy Create free account
hub / github.com/StarpTech/FastGraph / mock

Function mock

src/test-utils.ts:287–305  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

285
286 return {
287 mock() {
288 // @ts-ignore - faking it
289 globalThis.fetch = async (input: RequestInfo, init?: RequestInit) => {
290 fetchInput = input
291 fetchInit = init
292
293 return {
294 ok: true,
295 status: 200,
296 statusText: 'OK',
297 headers: new globalThis.Headers(Object.entries(headers)),
298 json() {
299 return json
300 },
301 }
302 }
303
304 return this
305 },
306 getArgs() {
307 return {
308 input: fetchInput,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected