From 7befcaa03345f10c7df21af7db99b18d4e63663c Mon Sep 17 00:00:00 2001 From: Studio Date: Tue, 1 Dec 2026 21:03:51 -0500 Subject: [PATCH] T-139: tests --- libs/research/test/feature-library.test.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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); } });