Skip to content

Commit

Permalink
chore: fix test case failing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
suisin-deriv committed Jan 2, 2025
1 parent f88f9fa commit d450498
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ describe('useIsHubRedirectionEnabled', () => {
const { result } = renderHook(() => useIsHubRedirectionEnabled());

expect(result.current.isHubRedirectionEnabled).toBe(false);
expect(result.current.isChangingToHubAppId).toBe(false);
});

it('should return false if client country is not in the hub enabled list', () => {
Expand All @@ -49,7 +50,7 @@ describe('useIsHubRedirectionEnabled', () => {
expect(result.current.isHubRedirectionEnabled).toBe(true);
});

it('should return true if client country is in the hub enabled list but not in the citizen list', () => {
it('should return isChangingToHubAppId true if client country is in the hub enabled list but not in the citizen list', () => {
(useClientCountry as jest.Mock).mockReturnValue({ data: 'UK' });
(useSettings as jest.Mock).mockReturnValue({ data: { citizen: 'MY' } });
(useGrowthbookGetFeatureValue as jest.Mock).mockReturnValue([
Expand All @@ -58,6 +59,6 @@ describe('useIsHubRedirectionEnabled', () => {
},
]);
const { result } = renderHook(() => useIsHubRedirectionEnabled());
expect(result.current.isHubRedirectionEnabled).toBe(true);
expect(result.current.isChangingToHubAppId).toBe(true);
});
});

0 comments on commit d450498

Please sign in to comment.