(qualifiedName: string)
| 3803 | } |
| 3804 | |
| 3805 | function callerNamesOf(qualifiedName: string): string[] { |
| 3806 | const target = cg.getNodesByKind('method').find((n) => n.qualifiedName === qualifiedName); |
| 3807 | if (!target) return []; |
| 3808 | const names = cg |
| 3809 | .getIncomingEdges(target.id) |
| 3810 | .filter((e) => e.kind === 'calls') |
| 3811 | .map((e) => cg.getNode(e.source)?.name) |
| 3812 | .filter((n): n is string => !!n); |
| 3813 | return [...new Set(names)].sort(); |
| 3814 | } |
| 3815 | |
| 3816 | it('resolves singleton chains and auto locals to the right class, never the first-sorted one', async () => { |
| 3817 | // Two classes share writeLog; Logger sorts first so it wins any name-only |
no test coverage detected