diff --git a/core-ingestion/src/__tests__/queries.go.test.ts b/core-ingestion/src/__tests__/queries.go.test.ts index 273cdcb3..e4e53ca2 100644 --- a/core-ingestion/src/__tests__/queries.go.test.ts +++ b/core-ingestion/src/__tests__/queries.go.test.ts @@ -38,6 +38,13 @@ func (s *Service) Run() { dstName: 'fmt', predicate: 'IMPORTS', }); + + expect(result!.entities).toContainEqual( + expect.objectContaining({ name: 'Run', kind: 'method', container: 'Service' }), + ); + expect(result!.chunks).toContainEqual( + expect.objectContaining({ name: 'Run', chunkKind: 'method', container: 'Service' }), + ); }); it('captures REFERENCES edges for pointer-typed struct fields (Bug 2)', () => { diff --git a/core-ingestion/src/index.ts b/core-ingestion/src/index.ts index d0a141b0..770ab422 100644 --- a/core-ingestion/src/index.ts +++ b/core-ingestion/src/index.ts @@ -480,7 +480,7 @@ export function parseFile(filePath: string, source: string): FileParseResult | n startByte, endByte, language, - container: enclosing ?? undefined, + container: effectiveContainer, }); if (kind === 'class' || kind === 'interface' || kind === 'trait') {