(fnName: string, kind: string = 'function')
| 445 | } |
| 446 | |
| 447 | function callersOf(fnName: string, kind: string = 'function'): string[] { |
| 448 | const results = cg.searchNodes(fnName); |
| 449 | const def = results.map((r) => r.node).find((n) => n.kind === kind && n.name === fnName); |
| 450 | if (!def) return []; |
| 451 | return cg.getCallers(def.id).map((c) => c.node.name); |
| 452 | } |
| 453 | |
| 454 | beforeEach(async () => { |
| 455 | testDir = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-1240-')); |
no test coverage detected