More renaming
Avoid usage of "Feature Flag" unless we are talking specifically about the response from github features api. Otherwise, use terms like "Toggleable features". Note both "toggleable" and "togglable" appear to be valid spellings of the word. I chose the first for no good reason.
This commit is contained in:
parent
b27aed78f5
commit
1a17c59fb0
39 changed files with 237 additions and 200 deletions
10
lib/feature-flags.test.js
generated
10
lib/feature-flags.test.js
generated
|
|
@ -153,6 +153,16 @@ for (const featureFlag of Object.keys(feature_flags_1.featureConfig)) {
|
|||
});
|
||||
}
|
||||
}
|
||||
// If we ever run into a situation where we no longer have any feature flags that
|
||||
// specify a minimum version, then we will have a bunch of code no longer being
|
||||
// tested. This is unlikely, and this test will fail if that happens.
|
||||
// If we do end up in that situation, then we should consider adding a synthetic
|
||||
// feature flag with a minium version that is only used for tests.
|
||||
(0, ava_1.default)("At least one feature has a minimum version specified", (t) => {
|
||||
t.assert(Object.values(feature_flags_1.featureConfig).some((f) => f.minimumVersion !== undefined), "At least one feature flag should have a minimum version specified");
|
||||
// An even less likely scenario is that we no longer have any feature flags.
|
||||
t.assert(Object.values(feature_flags_1.featureConfig).length > 0, "There should be at least one feature flag");
|
||||
});
|
||||
function assertAllFeaturesUndefinedInApi(t, loggedMessages) {
|
||||
for (const featureFlag of Object.keys(feature_flags_1.featureConfig)) {
|
||||
t.assert(loggedMessages.find((v) => v.type === "debug" &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue