(fn: string)
| 216 | // one; the globals are not named after their classes, so no name match does. |
| 217 | /** Qualified names of the methods `fn` in app/globals.py calls. */ |
| 218 | const calls = (fn: string): string[] => { |
| 219 | const node = cg.getNodesInFile('app/globals.py').find((n) => n.name === fn && n.kind === 'function')!; |
| 220 | expect(node, fn).toBeDefined(); |
| 221 | return cg.getOutgoingEdges(node.id).filter((e) => e.kind === 'calls') |
| 222 | .map((e) => cg.getNode(e.target)!).filter((n) => n.kind === 'method').map((n) => n.qualifiedName); |
| 223 | }; |
| 224 | expect(calls('use_plain')).toEqual(['Base::run']); |
| 225 | expect(calls('use_leaf')).toEqual(['Base::run']); |
| 226 | expect(calls('use_two')).toEqual(['Pair::run']); |
no test coverage detected