We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5a9827 commit 96ae793Copy full SHA for 96ae793
frontend/src/__tests__/app/internal/features/route.test.ts
@@ -83,6 +83,21 @@ describe('features route', () => {
83
expect(json).toEqual(allFeaturesEnabled);
84
});
85
86
+ it('defaults to false for missing feature flags', async () => {
87
+ mockFetchClient.mockResolvedValueOnce({
88
+ data: { features: { proofing: true } },
89
+ });
90
+
91
+ const req = createRequest();
92
+ const res = await getFeatures(req);
93
+ const json = await res.json();
94
95
+ expect(json).toEqual({
96
+ proofing: true,
97
+ routing: false,
98
99
100
101
it('returns initialFeatureFlags if fetchClient returns undefined', async () => {
102
mockFetchClient.mockResolvedValueOnce({} as Result<null>);
103
0 commit comments