The methods a function calls, as `Class::method@file`.
(fn: string)
| 33 | |
| 34 | /** The methods a function calls, as `Class::method@file`. */ |
| 35 | function methodCallees(fn: string): string[] { |
| 36 | const from = cg!.getNodesByKind('function').find((n) => n.qualifiedName === fn); |
| 37 | expect(from, `${fn} should be indexed`).toBeDefined(); |
| 38 | return cg! |
| 39 | .getOutgoingEdges(from!.id) |
| 40 | .filter((e) => e.kind === 'calls') |
| 41 | .map((e) => cg!.getNode(e.target)) |
| 42 | .filter((n): n is NonNullable<typeof n> => !!n && n.kind === 'method') |
| 43 | .map((n) => `${n.qualifiedName}@${n.filePath}`) |
| 44 | .sort(); |
| 45 | } |
| 46 | |
| 47 | const CLIENT = [ |
| 48 | 'class Client:', |
no test coverage detected