mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
fix: prevent config resolver snapshot test (#8041)
Prevent test failing on a system with different environment variables. Spreading `experimental` serves similar purpose.
This commit is contained in:
parent
76ffdb2cd3
commit
ea328e5b43
@ -70,92 +70,6 @@ exports[`should create default config 1`] = `
|
||||
Symbol(kCapture): false,
|
||||
},
|
||||
"feedbackUriPath": undefined,
|
||||
"flagResolver": FlagResolver {
|
||||
"experiments": {
|
||||
"addonUsageMetrics": false,
|
||||
"adminTokenKillSwitch": false,
|
||||
"anonymiseEventLog": false,
|
||||
"anonymizeProjectOwners": false,
|
||||
"archiveProjects": false,
|
||||
"automatedActions": false,
|
||||
"caseInsensitiveInOperators": false,
|
||||
"celebrateUnleash": false,
|
||||
"collectTrafficDataUsage": false,
|
||||
"demo": false,
|
||||
"disableBulkToggle": false,
|
||||
"disableMetrics": false,
|
||||
"disableNotifications": false,
|
||||
"disablePublishUnannouncedEvents": false,
|
||||
"disableShowContextFieldSelectionValues": false,
|
||||
"disableUpdateMaxRevisionId": false,
|
||||
"displayTrafficDataUsage": false,
|
||||
"edgeBulkMetrics": false,
|
||||
"embedProxy": true,
|
||||
"embedProxyFrontend": true,
|
||||
"enableLegacyVariants": false,
|
||||
"enableLicense": false,
|
||||
"enableLicenseChecker": false,
|
||||
"encryptEmails": false,
|
||||
"estimateTrafficDataCost": false,
|
||||
"extendedMetrics": false,
|
||||
"extendedUsageMetrics": false,
|
||||
"featureSearchFeedback": {
|
||||
"enabled": false,
|
||||
"name": "withText",
|
||||
"payload": {
|
||||
"type": "json",
|
||||
"value": "",
|
||||
},
|
||||
},
|
||||
"featureSearchFeedbackPosting": false,
|
||||
"featuresExportImport": true,
|
||||
"feedbackComments": {
|
||||
"enabled": false,
|
||||
"name": "feedbackComments",
|
||||
"payload": {
|
||||
"type": "json",
|
||||
"value": "",
|
||||
},
|
||||
},
|
||||
"filterInvalidClientMetrics": false,
|
||||
"googleAuthEnabled": false,
|
||||
"killScheduledChangeRequestCache": false,
|
||||
"maintenanceMode": false,
|
||||
"manyStrategiesPagination": false,
|
||||
"messageBanner": {
|
||||
"enabled": false,
|
||||
"name": "message-banner",
|
||||
"payload": {
|
||||
"type": "json",
|
||||
"value": "",
|
||||
},
|
||||
},
|
||||
"migrationLock": true,
|
||||
"navigationSidebar": true,
|
||||
"newEventSearch": false,
|
||||
"onboardingMetrics": false,
|
||||
"onboardingUI": false,
|
||||
"originMiddleware": false,
|
||||
"outdatedSdksBanner": false,
|
||||
"personalAccessTokensKillSwitch": false,
|
||||
"projectListImprovements": false,
|
||||
"projectOverviewRefactorFeedback": false,
|
||||
"queryMissingTokens": false,
|
||||
"removeUnsafeInlineStyleSrc": false,
|
||||
"responseTimeMetricsFix": false,
|
||||
"responseTimeWithAppNameKillSwitch": false,
|
||||
"showInactiveUsers": false,
|
||||
"signals": false,
|
||||
"strictSchemaValidation": false,
|
||||
"useMemoizedActiveTokens": false,
|
||||
"useProjectReadModel": false,
|
||||
"userAccessUIEnabled": false,
|
||||
},
|
||||
"externalResolver": {
|
||||
"getVariant": [Function],
|
||||
"isEnabled": [Function],
|
||||
},
|
||||
},
|
||||
"frontendApi": {
|
||||
"refreshIntervalInMs": 2700000,
|
||||
},
|
||||
|
@ -15,8 +15,13 @@ test('should create default config', async () => {
|
||||
},
|
||||
});
|
||||
|
||||
const { experimental, ...configWithoutExperimental } = config;
|
||||
const { experimental, flagResolver, ...configWithoutExperimental } = config;
|
||||
expect(configWithoutExperimental).toMatchSnapshot();
|
||||
expect(flagResolver).toMatchObject({
|
||||
getAll: expect.any(Function),
|
||||
isEnabled: expect.any(Function),
|
||||
getVariant: expect.any(Function),
|
||||
});
|
||||
});
|
||||
|
||||
test('should add initApiToken for admin token from options', async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user