(id: string, filePath = 'lib/other.js', extra: Partial<Node> = {})
| 8 | import type { Node } from '../src/types'; |
| 9 | |
| 10 | function node(id: string, filePath = 'lib/other.js', extra: Partial<Node> = {}): Node { |
| 11 | return { id, filePath, kind: 'function', name: 'target', qualifiedName: 'target', language: 'javascript', |
| 12 | startLine: 1, endLine: 1, startColumn: 0, endColumn: 0, updatedAt: 0, ...extra }; |
| 13 | } |
| 14 | function context(nodes: Node[], source = 'target();'): ResolutionContext { |
| 15 | return { |
| 16 | getNodesByName: name => nodes.filter(n => n.name === name), |
no outgoing calls
no test coverage detected