(g: CodeGraph, file: string, name: string, kind?: string)
| 200 | }); |
| 201 | |
| 202 | function node(g: CodeGraph, file: string, name: string, kind?: string): Node { |
| 203 | const found = g.getNodesInFile(file).filter((n) => n.name === name && (!kind || n.kind === kind)); |
| 204 | expect(found, `${kind ?? 'node'} ${name} in ${file}`).toHaveLength(1); |
| 205 | return found[0]!; |
| 206 | } |
| 207 | |
| 208 | /** Where a node's references named `name` go, `kind:name@file`, and which strategy resolved each. */ |
| 209 | function referencesFrom(g: CodeGraph, from: Node, name: string, edgeKind = 'references') { |
no test coverage detected