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