| 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; |