Merge branch 'renovate/all-minor-patch' into 'main'
[ProtonMail-WebClient.git] / packages / wallet / tests / mocks / useBitcoinAddressHighestIndex.ts
blobc3fa99ab483471b3a48039ef30d718fa26f8814f
1 import type { MockedFunction } from 'vitest';
3 import * as useBitcoinAddressHighestIndexModule from '../../store/hooks/useBitcoinAddressHighestIndex';
5 export const mockUseGetBitcoinAddressHighestIndex = (
6     mockedValue?: MockedFunction<
7         ReturnType<typeof useBitcoinAddressHighestIndexModule.useGetBitcoinAddressHighestIndex>
8     >
9 ) => {
10     const spy = vi.spyOn(useBitcoinAddressHighestIndexModule, 'useGetBitcoinAddressHighestIndex');
12     spy.mockReturnValue(mockedValue ?? vi.fn());
14     return spy;