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

fix: Return all toggles when env var is set and flag is on

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
This commit is contained in:
andreas-unleash 2023-03-02 18:03:28 +02:00
parent 689b46c517
commit 649f39b8e3
No known key found for this signature in database
GPG Key ID: DB82A1577B38F66B
2 changed files with 2 additions and 2 deletions

View File

@ -86,7 +86,7 @@ export class ProxyService {
return definitions.map((feature) => ({ return definitions.map((feature) => ({
name: feature.name, name: feature.name,
enabled: Boolean(client.isEnabled(feature.name)), enabled: Boolean(client.isEnabled(feature.name, context)),
variant: client.forceGetVariant(feature.name, context), variant: client.forceGetVariant(feature.name, context),
impressionData: Boolean(feature.impressionData), impressionData: Boolean(feature.impressionData),
})); }));

View File

@ -14,7 +14,6 @@ import {
IStrategyConfig, IStrategyConfig,
} from '../../../../lib/types'; } from '../../../../lib/types';
import { ProxyRepository } from '../../../../lib/proxy'; import { ProxyRepository } from '../../../../lib/proxy';
import * as process from 'process';
let app: IUnleashTest; let app: IUnleashTest;
let db: ITestDb; let db: ITestDb;
@ -1002,6 +1001,7 @@ test('should return all features when specified', async () => {
], ],
}); });
}); });
process.env.RETURN_ALL_TOGGLES = 'false';
}); });
test('should return all features when env var is set only', async () => { test('should return all features when env var is set only', async () => {