1 import type { MockedFunction } from 'vitest';
3 import { exchangeRate } from '@proton/wallet/tests';
5 import * as useExchangeRateModule from '../../store/hooks/useExchangeRate';
7 export const mockUseGetExchangeRate = (
8 mockedValue?: MockedFunction<ReturnType<typeof useExchangeRateModule.useGetExchangeRate>>
10 const spy = vi.spyOn(useExchangeRateModule, 'useGetExchangeRate');
12 spy.mockReturnValue(mockedValue ?? vi.fn().mockResolvedValue(exchangeRate));