(name: string)
| 514 | const cg = await CodeGraph.init(dir, { index: true }); |
| 515 | try { |
| 516 | const callers = (name: string) => { |
| 517 | const target = cg.getNodesByKind('function').find((n) => n.qualifiedName === name && n.filePath === 'Lib.pas'); |
| 518 | return target ? cg.getIncomingEdges(target.id).filter((e) => e.kind === 'calls').map((e) => cg.getNode(e.source)?.qualifiedName) : []; |
| 519 | }; |
| 520 | expect(callers('LockedFind')).toEqual(['TFake::Find']); |
| 521 | expect(callers('Deref')).toEqual(['TFake::GetParams']); |
| 522 | } finally { |
no test coverage detected