MCPcopy
hub / github.com/garrytan/gstack / snapshot

Function snapshot

test/gen-skill-docs-idempotency.test.ts:64–73  ·  view source on GitHub ↗
(files: string[] = STABLE_OUTPUTS)

Source from the content-addressed store, hash-verified

62}
63
64function snapshot(files: string[] = STABLE_OUTPUTS): Map<string, string> {
65 const m = new Map<string, string>();
66 for (const rel of files) {
67 const full = path.join(REPO_ROOT, rel);
68 if (fs.existsSync(full)) {
69 m.set(rel, fs.readFileSync(full, 'utf-8'));
70 }
71 }
72 return m;
73}
74
75describe('gen-skill-docs idempotency', () => {
76 test('two consecutive runs produce byte-identical outputs (no flapping fields)', () => {

Calls 1

setMethod · 0.80

Tested by

no test coverage detected