Skip to content

Commit

Permalink
Updated tests to mock isUnlocked
Browse files Browse the repository at this point in the history
Closes #643
  • Loading branch information
tombeckenham committed Mar 4, 2025
1 parent 814fc8d commit 19fd005
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ui/hooks/__tests__/useCoinHook.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ vi.mock('@/ui/utils/WalletContext', () => ({
useWalletLoaded: vi.fn().mockReturnValue(true),
useWallet: vi.fn().mockReturnValue({
refreshCoinList: vi.fn().mockResolvedValue(undefined),
isUnlocked: vi.fn().mockResolvedValue(true),
getMainWallet: vi.fn().mockResolvedValue('test-address'),
}),
}));

Expand Down Expand Up @@ -159,6 +161,7 @@ describe('useCoinHook', () => {
useWallet: () => ({
refreshCoinList: vi.fn().mockResolvedValue(undefined),
getMainWallet: vi.fn(),
isUnlocked: vi.fn().mockResolvedValue(true),
openapi: {
getAccountMinFlow: vi.fn(),
},
Expand Down

0 comments on commit 19fd005

Please sign in to comment.