MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / mk

Function mk

__tests__/include-config.test.ts:107–111  ·  view source on GitHub ↗
(rel: string, content = 'export const x = 1;\n')

Source from the content-addressed store, hash-verified

105describe('include behavior — scanDirectory force-indexes gitignored source', () => {
106 let dir: string;
107 const mk = (rel: string, content = 'export const x = 1;\n') => {
108 const p = path.join(dir, rel);
109 fs.mkdirSync(path.dirname(p), { recursive: true });
110 fs.writeFileSync(p, content);
111 };
112 const writeConfig = (obj: unknown) =>
113 fs.writeFileSync(path.join(dir, 'codegraph.json'), JSON.stringify(obj));
114 const scan = () => scanDirectory(dir).map((f) => f.replace(/\\/g, '/'));

Callers 1

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected