What the function `name` calls, as `target@file`.
(cg: CodeGraph | undefined, name: string)
| 179 | |
| 180 | /** What the function `name` calls, as `target@file`. */ |
| 181 | function calls(cg: CodeGraph | undefined, name: string): string[] { |
| 182 | const from = cg!.getNodesByKind('function').find((n) => n.name === name); |
| 183 | expect(from, name).toBeDefined(); |
| 184 | return cg! |
| 185 | .getOutgoingEdges(from!.id) |
| 186 | .filter((e) => e.kind === 'calls') |
| 187 | .map((e) => cg!.getNode(e.target)!) |
| 188 | .map((n) => `${n.name}@${n.filePath.replace(/\\/g, '/')}`) |
| 189 | .sort(); |
| 190 | } |
| 191 | |
| 192 | /** Both tests of a service: through `import mod` and through `from mod import check`. */ |
| 193 | function reached(cg: CodeGraph | undefined, name: string): string[][] { |
no test coverage detected