(fnName: string, kind: string = 'function')
| 467 | } |
| 468 | |
| 469 | function callersOf(fnName: string, kind: string = 'function'): string[] { |
| 470 | const results = cg.searchNodes(fnName); |
| 471 | const def = results.map((r) => r.node).find((n) => n.kind === kind && n.name === fnName); |
| 472 | if (!def) return []; |
| 473 | return cg.getCallers(def.id).map((c) => c.node.name); |
| 474 | } |
| 475 | |
| 476 | beforeEach(async () => { |
| 477 | testDir = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-1240-')); |
no test coverage detected