The one node with this qualified name in `file`.
(g: CodeGraph, qualifiedName: string, file: string)
| 60 | |
| 61 | /** The one node with this qualified name in `file`. */ |
| 62 | function node(g: CodeGraph, qualifiedName: string, file: string) { |
| 63 | const found = g.getNodesByQualifiedName(qualifiedName).filter((n) => n.filePath === file); |
| 64 | expect(found, `${qualifiedName}@${file}`).toHaveLength(1); |
| 65 | return found[0]!; |
| 66 | } |
| 67 | /** `qualifiedName@file` at the other end of a node's `calls` edges. */ |
| 68 | const calls = (g: CodeGraph, id: string, direction: 'in' | 'out') => |
| 69 | (direction === 'in' ? g.getIncomingEdges(id) : g.getOutgoingEdges(id)) |
no test coverage detected