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

Function score

__tests__/dotdot-folder-names.test.ts:145–150  ·  view source on GitHub ↗
(config: object | null)

Source from the content-addressed store, hash-verified

143 'src/client.ts': 'export function makeClient(): number { return 2; }\n',
144 };
145 const score = async (config: object | null): Promise<number> => {
146 const root = project(config ? { ...files, 'codegraph.json': JSON.stringify(config) } : files);
147 const cg = await CodeGraph.init(root, { index: true });
148 graphs.push(cg);
149 return cg.searchNodes('makeClient', { limit: 10 }).find((r) => r.node.filePath === '..generated/client.ts')!.score;
150 };
151 expect(await score({ deprioritize: ['..generated/'] })).toBeLessThan(await score(null));
152 });
153});

Callers 1

Calls 4

pushMethod · 0.80
projectFunction · 0.70
searchNodesMethod · 0.65
initMethod · 0.45

Tested by

no test coverage detected