MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / baseContext

Function baseContext

__tests__/resolution.test.ts:2888–2899  ·  view source on GitHub ↗
(candidates: Node[])

Source from the content-addressed store, hash-verified

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.

Callers 1

resolution.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected