| 2120 | line: 2, column: 0, filePath, language, |
| 2121 | }); |
| 2122 | const ctxFor = (candidates: Node[]): ResolutionContext => ({ |
| 2123 | getNodesInFile: () => [], |
| 2124 | getNodesByName: (name) => candidates.filter((c) => c.name === name), |
| 2125 | getNodesByQualifiedName: () => [], |
| 2126 | getNodesByKind: () => [], |
| 2127 | fileExists: () => false, |
| 2128 | readFile: () => null, |
| 2129 | getProjectRoot: () => '', |
| 2130 | getAllFiles: () => [], |
| 2131 | }); |
| 2132 | |
| 2133 | it('prefers the definition in the call site\'s own file (#1079)', () => { |
| 2134 | // matches[0] is the a/ definition; the call comes from b/, so it must |