Skip to content

Commit ae986e7

Browse files
Change the return of configuration
Signed-off-by: Thomas Poignant <[email protected]>
1 parent 13a3836 commit ae986e7

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

libs/providers/go-feature-flag/src/lib/go-feature-flag-provider.test.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,10 +1046,14 @@ describe('GoFeatureFlagProvider', () => {
10461046
});
10471047

10481048
it('Should error if flag configuration endpoint return a 401', async () => {
1049-
jest.useRealTimers();
1050-
fetchMock.mockResponseOnce(getConfigurationEndpointResult(), {
1051-
status: 401,
1052-
headers: { 'Content-Type': 'application/json' },
1049+
fetchMock.mockIf(/^http:\/\/localhost:1031\/v1\/flag\/configuration/, async () => {
1050+
return {
1051+
body: '{}',
1052+
status: 401,
1053+
headers: {
1054+
'Content-Type': 'application/json',
1055+
},
1056+
};
10531057
});
10541058

10551059
const provider = new GoFeatureFlagProvider({

0 commit comments

Comments
 (0)