(fromName: string, calleeName: string)
| 1638 | const cg = await CodeGraph.init(tmpDir, { index: true }); |
| 1639 | try { |
| 1640 | const target = (fromName: string, calleeName: string) => { |
| 1641 | const from = cg.getNodesByKind('method').find((n) => n.name === fromName); |
| 1642 | expect(from).toBeDefined(); |
| 1643 | return cg.getOutgoingEdges(from!.id).filter((e) => e.kind === 'calls') |
| 1644 | .map((e) => cg.getNode(e.target)).find((t) => t?.name === calleeName); |
| 1645 | }; |
| 1646 | expect(target('check', 'validate')?.startLine).toBe(4); |
| 1647 | expect(target('read_one', 'readKey')?.filePath).toBe('app/kafka/one/Manager.scala'); |
| 1648 | expect(target('read_two', 'readKey')?.filePath).toBe('app/kafka/two/Manager.scala'); |
no test coverage detected