| 2886 | |
| 2887 | describe('Name Matcher: kind bias for new ref kinds', () => { |
| 2888 | const baseContext = (candidates: Node[]): ResolutionContext => ({ |
| 2889 | getNodesInFile: () => [], |
| 2890 | getNodesByName: (name) => candidates.filter((c) => c.name === name), |
| 2891 | getNodesByQualifiedName: () => [], |
| 2892 | getNodesByKind: () => [], |
| 2893 | fileExists: () => true, |
| 2894 | readFile: () => null, |
| 2895 | getProjectRoot: () => '/test', |
| 2896 | getAllFiles: () => [], |
| 2897 | getNodesByLowerName: () => [], |
| 2898 | getImportMappings: () => [], |
| 2899 | }); |
| 2900 | |
| 2901 | it('prefers a class candidate over a function for `instantiates` refs', () => { |
| 2902 | // A class and a function share a name across the codebase. |