Fall back to the default.json CLI version if feature flags misconfigured
This commit is contained in:
parent
14c4412c63
commit
5d931ea2a2
6 changed files with 33 additions and 15 deletions
4
lib/feature-flags.test.js
generated
4
lib/feature-flags.test.js
generated
|
|
@ -242,13 +242,13 @@ for (const variant of [util_1.GitHubVariant.GHAE, util_1.GitHubVariant.GHES]) {
|
|||
});
|
||||
});
|
||||
});
|
||||
(0, ava_1.default)(`selects CLI v2.11.6 on Dotcom when no default version feature flags are enabled`, async (t) => {
|
||||
(0, ava_1.default)(`selects CLI from defaults.json on Dotcom when no default version feature flags are enabled`, async (t) => {
|
||||
await (0, util_1.withTmpDir)(async (tmpDir) => {
|
||||
const featureEnablement = setUpFeatureFlagTests(tmpDir);
|
||||
const expectedFeatureEnablement = initializeFeatures(true);
|
||||
(0, testing_utils_1.mockFeatureFlagApiEndpoint)(200, expectedFeatureEnablement);
|
||||
t.deepEqual(await featureEnablement.getDefaultCliVersion(util_1.GitHubVariant.DOTCOM), {
|
||||
cliVersion: "2.11.6",
|
||||
cliVersion: defaults.cliVersion,
|
||||
variant: util_1.GitHubVariant.DOTCOM,
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue