Skip to content

Commit 0a2f776

Browse files
committed
refactor: improve formatting of mock for useGatorPermissionTokenInfo in DisconnectPermissionsModal tests
1 parent 99d72f2 commit 0a2f776

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

ui/components/multichain/disconnect-permissions-modal/disconnect-permissions-modal.test.tsx

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,21 @@ jest.mock('../../../../shared/lib/gator-permissions', () => ({
1818
}));
1919

2020
// Mock the useGatorPermissionTokenInfo hook
21-
jest.mock('../../../hooks/gator-permissions/useGatorPermissionTokenInfo', () => ({
22-
useGatorPermissionTokenInfo: jest.fn().mockReturnValue({
23-
tokenInfo: {
24-
symbol: 'ETH',
25-
decimals: 18,
26-
chainId: '0x1',
27-
},
28-
loading: false,
29-
error: null,
30-
source: 'native',
21+
jest.mock(
22+
'../../../hooks/gator-permissions/useGatorPermissionTokenInfo',
23+
() => ({
24+
useGatorPermissionTokenInfo: jest.fn().mockReturnValue({
25+
tokenInfo: {
26+
symbol: 'ETH',
27+
decimals: 18,
28+
chainId: '0x1',
29+
},
30+
loading: false,
31+
error: null,
32+
source: 'native',
33+
}),
3134
}),
32-
}));
35+
);
3336

3437
describe('DisconnectPermissionsModal', () => {
3538
const onSkip = jest.fn();

0 commit comments

Comments
 (0)