Skip to content

Commit 855c088

Browse files
committed
Improve test for throwing when no CodeQL provided
1 parent ec1705e commit 855c088

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/feature-flags.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,11 @@ for (const feature of Object.keys(featureConfig)) {
257257
const expectedFeatureEnablement = initializeFeatures(true);
258258
mockFeatureFlagApiEndpoint(200, expectedFeatureEnablement);
259259

260+
// The type system should prevent this happening, but test that if we
261+
// bypass it we get the expected error.
260262
await t.throwsAsync(
261-
async () => features.getValue(feature as FeatureWithoutCLI),
263+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
264+
async () => features.getValue(feature as any),
262265
{
263266
message: `Internal error: A ${
264267
featureConfig[feature].minimumVersion !== undefined

0 commit comments

Comments
 (0)