MCPcopy Create free account
hub / github.com/garrytan/gstack / freshPaths

Function freshPaths

test/gstack-decision.test.ts:122–130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

120
121describe("snapshot + compaction (real files)", () => {
122 function freshPaths(): { paths: DecisionPaths; cleanup: () => void } {
123 const dir = mkdtempSync(join(tmpdir(), "decision-store-"));
124 const paths: DecisionPaths = {
125 log: join(dir, "decisions.jsonl"),
126 snapshot: join(dir, "decisions.active.json"),
127 archive: join(dir, "decisions.archive.jsonl"),
128 };
129 return { paths, cleanup: () => rmSync(dir, { recursive: true, force: true }) };
130 }
131
132 it("writeSnapshot/readSnapshot roundtrip; bounded read returns active", () => {
133 const { paths, cleanup } = freshPaths();

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected