The calls made by the function or method with this qualified name, as `kind qualifiedName (file:line)`.
(qualifiedName: string)
| 32 | |
| 33 | /** The calls made by the function or method with this qualified name, as `kind qualifiedName (file:line)`. */ |
| 34 | function callsFrom(qualifiedName: string): string[] { |
| 35 | const from = [...cg!.getNodesByKind('function'), ...cg!.getNodesByKind('method')].find((n) => n.qualifiedName === qualifiedName); |
| 36 | expect(from, `${qualifiedName} should be indexed`).toBeDefined(); |
| 37 | return cg!.getOutgoingEdges(from!.id).filter((e) => e.kind === 'calls') |
| 38 | .map((e) => { const t = cg!.getNode(e.target)!; return `${t.kind} ${t.qualifiedName} (${t.filePath}:${t.startLine})`; }) |
| 39 | .sort(); |
| 40 | } |
| 41 | |
| 42 | afterEach(() => { |
| 43 | cg?.close(); |
no test coverage detected