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

Function rustProject

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

Source from the content-addressed store, hash-verified

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

Callers 1

extraction.test.tsFile · 0.85

Calls 2

createTempDirFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected