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

Function index

__tests__/rust-enum-variant-reference.test.ts:21–26  ·  view source on GitHub ↗
(files: Record<string, string>)

Source from the content-addressed store, hash-verified

19afterEach(() => { cg?.close(); cg = undefined; fs.rmSync(root, { recursive: true, force: true }); });
20
21async function index(files: Record<string, string>) {
22 fs.mkdirSync(path.join(root, 'src'));
23 fs.writeFileSync(path.join(root, 'Cargo.toml'), '[package]\nname = "repro"\nversion = "0.1.0"\nedition = "2021"\n');
24 for (const [file, text] of Object.entries(files)) fs.writeFileSync(path.join(root, 'src', file), text);
25 cg = await CodeGraph.init(root, { index: true });
26}
27
28/** The enum named `name` declared in `src/<file>`. */
29function enumIn(file: string, name = 'Mode') {

Calls 2

joinMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected