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:
parent
689b46c517
commit
649f39b8e3
@ -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),
|
||||||
}));
|
}));
|
||||||
|
@ -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 () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user