mirror of
https://github.com/github/codeql-action
synced 2026-05-31 00:00:46 +03:00
Improve test for throwing when no CodeQL provided
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user