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

Function rustProject

__tests__/extraction.test.ts:11327–11337  ·  view source on GitHub ↗
(files: Record<string, string>)

Source from the content-addressed store, hash-verified

11325
11326describe('Rust cross-module recall', () => {
11327 function rustProject(files: Record<string, string>): string {
11328 const dir = createTempDir();
11329 fs.writeFileSync(path.join(dir, 'Cargo.toml'), '[package]\nname = "proj"\nversion = "0.1.0"\nedition = "2021"\n');
11330 fs.mkdirSync(path.join(dir, 'src'), { recursive: true });
11331 for (const [rel, content] of Object.entries(files)) {
11332 const full = path.join(dir, 'src', rel);
11333 fs.mkdirSync(path.dirname(full), { recursive: true });
11334 fs.writeFileSync(full, content);
11335 }
11336 return dir;
11337 }
11338
11339 it('extracts a struct literal `Foo { .. }` as an instantiation across modules', async () => {
11340 const dir = rustProject({

Callers 1

extraction.test.tsFile · 0.85

Calls 2

createTempDirFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected