(caller: string)
| 106 | try { |
| 107 | await graph.indexAll(); |
| 108 | const target = (caller: string) => { |
| 109 | const from = graph.getNodesByName(caller).find((n) => n.kind === 'function')!; |
| 110 | return graph.getCallees(from.id).filter(({ edge }) => edge.kind === 'calls').map(({ node: n }) => n.filePath); |
| 111 | }; |
| 112 | expect(target('useA')).toEqual(['src/a/runner.ts']); |
| 113 | expect(target('useB')).toEqual(['src/b/runner.ts']); |
| 114 | } finally { |
no test coverage detected