From 855c0888b60f11117d06120c645f5cd5046ffb7f Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Mon, 5 Jan 2026 16:38:04 +0000 Subject: [PATCH] Improve test for throwing when no CodeQL provided --- src/feature-flags.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/feature-flags.test.ts b/src/feature-flags.test.ts index 4ba36356b..cdab85e27 100644 --- a/src/feature-flags.test.ts +++ b/src/feature-flags.test.ts @@ -257,8 +257,11 @@ for (const feature of Object.keys(featureConfig)) { const expectedFeatureEnablement = initializeFeatures(true); mockFeatureFlagApiEndpoint(200, expectedFeatureEnablement); + // The type system should prevent this happening, but test that if we + // bypass it we get the expected error. await t.throwsAsync( - async () => features.getValue(feature as FeatureWithoutCLI), + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + async () => features.getValue(feature as any), { message: `Internal error: A ${ featureConfig[feature].minimumVersion !== undefined