(name: string)
| 506 | const cg = await CodeGraph.init(dir, { index: true }); |
| 507 | try { |
| 508 | const callers = (name: string) => { |
| 509 | const target = cg.getNodesByKind('function').find((n) => n.qualifiedName === name && n.filePath === 'Lib.pas'); |
| 510 | return target ? cg.getIncomingEdges(target.id).filter((e) => e.kind === 'calls').map((e) => cg.getNode(e.source)?.name) : []; |
| 511 | }; |
| 512 | expect(callers('Translate')).toEqual(['KeyUp']); |
| 513 | expect(callers('Emit')).toEqual(['Generate']); |
| 514 | } finally { |
no test coverage detected