Merge branch 'renovate/all-minor-patch' into 'main'
[ProtonMail-WebClient.git] / packages / wallet / tests / mocks / useContactEmails.ts
bloba17b38d350eee6e46d1b2da972c789df331ed684
1 import * as useContactEmailsModule from '@proton/mail/contactEmails/hooks';
3 export const mockUseContactEmails = (
4     mockedValue?: Partial<ReturnType<typeof useContactEmailsModule.useContactEmails>>
5 ) => {
6     const spy = vi.spyOn(useContactEmailsModule, 'useContactEmails');
8     spy.mockReturnValue([
9         mockedValue?.[0] ?? [
10             {
11                 ID: '99',
12                 Email: 'test@test.com',
13                 Name: 'Eric Norbert',
14                 Type: [],
15                 Defaults: 0,
16                 Order: 1,
17                 ContactID: '99',
18                 LabelIDs: [],
19                 LastUsedTime: 0,
20             },
21         ],
22         mockedValue?.[1] ?? false,
23     ]);
25     return spy;