`L ` of each `references` edge from `fromName` to the package `func run`.
(fromName: string, kind: 'function' | 'variable' = 'function')
| 232 | |
| 233 | /** `L<line>` of each `references` edge from `fromName` to the package `func run`. */ |
| 234 | function refsToRun(fromName: string, kind: 'function' | 'variable' = 'function'): string[] { |
| 235 | const from = cg!.getNodesByKind(kind).find((n) => n.name === fromName); |
| 236 | expect(from, fromName).toBeDefined(); |
| 237 | return cg! |
| 238 | .getOutgoingEdges(from!.id) |
| 239 | .filter((e) => e.kind === 'references') |
| 240 | .filter((e) => { |
| 241 | const target = cg!.getNode(e.target); |
| 242 | return target?.kind === 'function' && target.name === 'run'; |
| 243 | }) |
| 244 | .map((e) => `L${e.line}`) |
| 245 | .sort(); |
| 246 | } |
| 247 | |
| 248 | it.each([ |
| 249 | ['an inner block local', 'shadowThenUse', 'L14'], |
no test coverage detected