Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
iamacook committed Sep 26, 2023
1 parent 8ae0a46 commit 0c4315f
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import * as sdk from '@safe-global/safe-gateway-typescript-sdk'
import { renderHook } from '@/tests/test-utils'
import { useNotificationRegistrations } from '../useNotificationRegistrations'
import * as web3 from '@/hooks/wallets/web3'
import * as wallet from '@/hooks/wallets/useWallet'
import * as logic from '../../logic'
import * as preferences from '../useNotificationPreferences'
import * as notificationsSlice from '@/store/notificationsSlice'
import type { ConnectedWallet } from '@/services/onboard'

jest.mock('@safe-global/safe-gateway-typescript-sdk')

Expand All @@ -29,6 +31,12 @@ describe('useNotificationRegistrations', () => {
beforeEach(() => {
const mockProvider = new Web3Provider(jest.fn())
jest.spyOn(web3, 'useWeb3').mockImplementation(() => mockProvider)
jest.spyOn(wallet, 'default').mockImplementation(
() =>
({
label: 'MetaMask',
} as unknown as ConnectedWallet),
)
})

const registerDeviceSpy = jest.spyOn(sdk, 'registerDevice')
Expand Down

0 comments on commit 0c4315f

Please sign in to comment.