diff --git a/libs/research/test/feature-library.test.ts b/libs/research/test/feature-library.test.ts index 1b9c3559..9315471d 100644 --- a/libs/research/test/feature-library.test.ts +++ b/libs/research/test/feature-library.test.ts @@ -1559,15 +1559,21 @@ describe('QA round 5: CTE scope parity with DuckDB across nesting and UNION bran validateError = error; } expect(validateError, label).toBeInstanceOf(FeatureLibraryError); + expect((validateError as FeatureLibraryError).code, label).toBe('EXTERNAL_DATA_ACCESS'); const fake = createRecordingFakeExecutor(); - await expect( - runFeatureBatch( + let execError: unknown; + try { + await runFeatureBatch( def, { curatedRoot: '/c', fromYear: 2021, toYear: 2021, vaultCutoffDate: '2022-01-01' }, fake.executor - ) - ).rejects.toBeInstanceOf(FeatureLibraryError); + ); + } catch (error) { + execError = error; + } + expect(execError, label).toBeInstanceOf(FeatureLibraryError); + expect((execError as FeatureLibraryError).code, label).toBe('EXTERNAL_DATA_ACCESS'); expect(fake.calls).toHaveLength(0); } });