1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-10 17:53:36 +02:00

null checks

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
This commit is contained in:
andreas-unleash 2023-03-03 09:39:51 +02:00
parent 6fa4adb67a
commit 845efa7fc0
No known key found for this signature in database
GPG Key ID: DB82A1577B38F66B

View File

@ -934,8 +934,10 @@ test('Should not recursively set off timers on events', async () => {
}); });
test('should return all features when specified', async () => { test('should return all features when specified', async () => {
app.config.experimental.flags.proxyReturnAllTogglesKillSwitch = true; if (app.config.experimental != null) {
app.config.experimental.flags.proxyReturnAllToggles = true; app.config.experimental.flags.proxyReturnAllTogglesKillSwitch = true;
app.config.experimental.flags.proxyReturnAllToggles = true;
}
const frontendToken = await createApiToken(ApiTokenType.FRONTEND); const frontendToken = await createApiToken(ApiTokenType.FRONTEND);
await createFeatureToggle({ await createFeatureToggle({
name: 'enabledFeature1', name: 'enabledFeature1',
@ -1005,8 +1007,10 @@ test('should return all features when specified', async () => {
}); });
test('should return all features when both feature flags are set only', async () => { test('should return all features when both feature flags are set only', async () => {
app.config.experimental.flags.proxyReturnAllTogglesKillSwitch = true; if (app.config.experimental != null) {
app.config.experimental.flags.proxyReturnAllToggles = false; app.config.experimental.flags.proxyReturnAllTogglesKillSwitch = true;
app.config.experimental.flags.proxyReturnAllToggles = false;
}
const frontendToken = await createApiToken(ApiTokenType.FRONTEND); const frontendToken = await createApiToken(ApiTokenType.FRONTEND);
await createFeatureToggle({ await createFeatureToggle({
name: 'enabledFeature1', name: 'enabledFeature1',