Remove "_enabled" suffix from non-legacy features
This commit is contained in:
parent
9dc84e9abe
commit
cf4c3b4434
15 changed files with 48 additions and 31 deletions
15
lib/feature-flags.test.js
generated
15
lib/feature-flags.test.js
generated
|
|
@ -331,9 +331,18 @@ for (const feature of Object.keys(feature_flags_1.featureConfig)) {
|
|||
"Ignoring feature flag default_codeql_version_2_20_invalid_enabled as it does not specify a valid CodeQL version.") !== undefined);
|
||||
});
|
||||
});
|
||||
(0, ava_1.default)("feature flags should end with _enabled", async (t) => {
|
||||
for (const feature of Object.values(feature_flags_1.Feature)) {
|
||||
t.assert(feature.endsWith("_enabled"), `${feature} should end with '_enabled'`);
|
||||
(0, ava_1.default)("legacy feature flags should end with _enabled", async (t) => {
|
||||
for (const [feature, config] of Object.entries(feature_flags_1.featureConfig)) {
|
||||
if (config.legacyApi) {
|
||||
t.assert(feature.endsWith("_enabled"), `legacy feature ${feature} should end with '_enabled'`);
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, ava_1.default)("non-legacy feature flags should not end with _enabled", async (t) => {
|
||||
for (const [feature, config] of Object.entries(feature_flags_1.featureConfig)) {
|
||||
if (!config.legacyApi) {
|
||||
t.false(feature.endsWith("_enabled"), `non-legacy feature ${feature} should not end with '_enabled'`);
|
||||
}
|
||||
}
|
||||
});
|
||||
function assertAllFeaturesUndefinedInApi(t, loggedMessages) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue