(config: object | null)
| 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 | }); |
no test coverage detected