`file:line name` of every edge of `kinds` leaving `file`.
(file: string, kinds: string[])
| 96 | |
| 97 | /** `file:line name` of every edge of `kinds` leaving `file`. */ |
| 98 | function edgesFrom(file: string, kinds: string[]): string[] { |
| 99 | const out: string[] = []; |
| 100 | for (const node of cg.getNodesInFile(file)) { |
| 101 | for (const e of cg.getOutgoingEdges(node.id)) { |
| 102 | if (!kinds.includes(e.kind)) continue; |
| 103 | const target = cg.getNode(e.target)!; |
| 104 | out.push(`${e.line} ${target.filePath}:${target.name}`); |
| 105 | } |
| 106 | } |
| 107 | return out; |
| 108 | } |
| 109 | |
| 110 | describe('a name a dynamic import binds from outside the project (#2491)', () => { |
| 111 | it("never links to a same-named project function: vite's `await import('node:http')`", () => { |
no test coverage detected