(qualifiedName: string)
| 2689 | } |
| 2690 | |
| 2691 | function callerNamesOf(qualifiedName: string): string[] { |
| 2692 | const target = cg.getNodesByKind('method').find((n) => n.qualifiedName === qualifiedName); |
| 2693 | if (!target) return []; |
| 2694 | const names = cg |
| 2695 | .getIncomingEdges(target.id) |
| 2696 | .filter((e) => e.kind === 'calls') |
| 2697 | .map((e) => cg.getNode(e.source)?.name) |
| 2698 | .filter((n): n is string => !!n); |
| 2699 | return [...new Set(names)].sort(); |
| 2700 | } |
| 2701 | |
| 2702 | it('resolves singleton chains and auto locals to the right class, never the first-sorted one', async () => { |
| 2703 | // Two classes share writeLog; Logger sorts first so it wins any name-only |
no test coverage detected