Improve test for throwing when no CodeQL provided

This commit is contained in:
Henry Mercer
2026-01-05 16:38:04 +00:00
parent ec1705eb43
commit 855c0888b6
+4 -1
View File
@@ -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