(graph: CodeGraph, file: string, name: string)
| 49 | .filter(([stripped, as]) => as === lang && stripped.length > 0 && text.startsWith(stripped)).length; |
| 50 | |
| 51 | const callers = (graph: CodeGraph, file: string, name: string) => { |
| 52 | const target = graph.getNodesByName(name).find((n) => n.filePath === file && n.kind === 'function')!; |
| 53 | return [...new Set(graph.getIncomingEdges(target.id).filter((e) => e.kind === 'calls') |
| 54 | .map((e) => graph.getNode(e.source)?.name))]; |
| 55 | }; |
| 56 | |
| 57 | it('reads a file with destructuring once, not once per call', async () => { |
| 58 | const CALLS = 40; |
no test coverage detected