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

Function makeContext

__tests__/resolution.test.ts:678–687  ·  view source on GitHub ↗
(byQName: Record<string, Node[]>)

Source from the content-addressed store, hash-verified

676 // Build a ResolutionContext stub whose getNodesByQualifiedName answers
677 // from a fixed table — the only context method resolveJvmImport touches.
678 const makeContext = (byQName: Record<string, Node[]>): ResolutionContext => ({
679 getNodesInFile: () => [],
680 getNodesByName: () => [],
681 getNodesByQualifiedName: (q) => byQName[q] ?? [],
682 getNodesByKind: () => [],
683 fileExists: () => false,
684 readFile: () => null,
685 getProjectRoot: () => '',
686 getAllFiles: () => [],
687 });
688 const node = (id: string, name: string, qualifiedName: string, kind: Node['kind'] = 'class', language: Node['language'] = 'kotlin'): Node => ({
689 id, kind, name, qualifiedName,
690 filePath: 'Models.kt', language,

Callers 1

resolution.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected