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

Function makeManyMethods

__tests__/resolution.test.ts:419–432  ·  view source on GitHub ↗
(n: number, name: string)

Source from the content-addressed store, hash-verified

417 // can assert the cap short-circuits BEFORE the O(K) scoring (not just that it
418 // returns null).
419 const makeManyMethods = (n: number, name: string): Node[] =>
420 Array.from({ length: n }, (_, i) => ({
421 id: `method:widget${i}.js:Widget${i}.${name}:1`,
422 kind: 'method' as const,
423 name,
424 qualifiedName: `widget${i}.js::Widget${i}::${name}`,
425 filePath: `static/theme/widget${i}.js`,
426 language: 'javascript' as const,
427 startLine: 1,
428 endLine: 5,
429 startColumn: 0,
430 endColumn: 0,
431 updatedAt: Date.now(),
432 }));
433
434 const spyContext = (nodes: Node[]): { ctx: ResolutionContext; lookups: () => number } => {
435 let scanned = 0;

Callers 1

resolution.test.tsFile · 0.85

Calls 1

fromMethod · 0.80

Tested by

no test coverage detected