MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / makeCtx

Function makeCtx

packages/http-routes/src/analytics-cache.test.ts:55–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53 let dbPath: string
54
55 function makeCtx(): HttpRouteContext {
56 return {
57 pathProvider: { getCacheDir: () => path.join(root, 'cache') },
58 sessionAdapter: { getDbPath: () => dbPath },
59 getVersion: () => '0.0.0-test',
60 } as unknown as HttpRouteContext
61 }
62
63 beforeEach(() => {
64 const baseDir = fs.existsSync('/private/tmp') ? '/private/tmp' : os.tmpdir()

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected