| 3 | import { browserGraphContext } from './graph-context'; |
| 4 | |
| 5 | function fixture(): SemanticIR { |
| 6 | // Deliberately partial provider data exercises the serialization boundary. |
| 7 | return { |
| 8 | schemaVersion: 1, |
| 9 | generation: 7, |
| 10 | symbol: { name: 'sum', qualifiedName: 'math.sum', kind: 'function', uri: 'file:///repo/src/sum.ts', range: { start: { line: 2, character: 0 }, end: { line: 8, character: 1 } }, projectName: 'sample', nodeId: 'node-3' }, |
| 11 | calls: { state: 'known', value: [{ targetName: 'add', targetQualifiedName: 'math.add', targetFile: 'src/add.ts', line: 4, targetLine: 8, args: ['provider-truncated-arg…'], confidence: 0.7, strategy: 'same-module' }], evidence: [{ source: 'graph-edge', relation: 'CALLS', file: 'src/sum.ts', range: { startLine: 4, endLine: 4 }, confidence: 0.7, engineGeneration: 7, providerId: 'cbm' }] }, |
| 12 | calledBy: { state: 'unknown', value: [], evidence: [] }, |
| 13 | } as unknown as SemanticIR; |
| 14 | } |
| 15 | |
| 16 | describe('optional browser graph context', () => { |
| 17 | it('offers context only for the active file and matching project', () => { |