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

Function writeProject

__tests__/framework-resolve-language.test.ts:18–25  ·  view source on GitHub ↗
(prefix: string, files: Record<string, string>)

Source from the content-addressed store, hash-verified

16import type { FrameworkResolver } from '../src/resolution/types';
17
18function writeProject(prefix: string, files: Record<string, string>): string {
19 const root = fs.mkdtempSync(path.join(os.tmpdir(), prefix));
20 for (const [rel, content] of Object.entries(files)) {
21 fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true });
22 fs.writeFileSync(path.join(root, rel), content);
23 }
24 return root;
25}
26
27describe('getResolvingFrameworks', () => {
28 const go: FrameworkResolver = { name: 'go', languages: ['go'], detect: () => true, resolve: () => null };

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected