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

Function mockCache

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

Source from the content-addressed store, hash-verified

20globalThis.APQ_TTL = '900'
21
22export const mockCache = () => {
23 const store = new Map()
24 const cache = {
25 // @ts-ignore
26 match(req) {
27 return store.get(req.url)
28 },
29 // @ts-ignore
30 put(req, res) {
31 store.set(req.url, res)
32 },
33 clear() {
34 store.clear()
35 },
36 get store() {
37 return store
38 },
39 }
40 return cache
41}
42
43// @ts-ignore
44// worktop/cache

Callers 1

test-utils.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected