(files: Record<string, string>)
| 26 | }); |
| 27 | |
| 28 | async function indexed(files: Record<string, string>): Promise<CodeGraph> { |
| 29 | const root = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-cpp-nested-')); |
| 30 | roots.push(root); |
| 31 | for (const [rel, content] of Object.entries(files)) { |
| 32 | fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true }); |
| 33 | fs.writeFileSync(path.join(root, rel), content); |
| 34 | } |
| 35 | return CodeGraph.init(root, { index: true }); |
| 36 | } |
| 37 | |
| 38 | function callable(cg: CodeGraph, qualifiedName: string): Node { |
| 39 | const node = [...cg.getNodesByKind('method'), ...cg.getNodesByKind('function')].find((n) => n.qualifiedName === qualifiedName); |
no test coverage detected