MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / writeTempJson

Function writeTempJson

packages/sync/src/pull-engine.test.ts:21–26  ·  view source on GitHub ↗
(data: unknown)

Source from the content-addressed store, hash-verified

19})
20
21function writeTempJson(data: unknown): string {
22 const file = path.join(os.tmpdir(), `chatlab-pull-engine-test-${process.pid}-${tempFiles.length}.json`)
23 fs.writeFileSync(file, JSON.stringify(data), 'utf-8')
24 tempFiles.push(file)
25 return file
26}
27
28async function withImmediateTimers<T>(fn: () => Promise<T>): Promise<T> {
29 const originalSetTimeout = globalThis.setTimeout

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected