1 import * as useLabelsModule from '@proton/mail/labels/hooks';
2 import type { Label } from '@proton/shared/lib/interfaces/Label';
4 export const mockUseLabels = (params?: [Label[]?, boolean?]) => {
5 const [value = [], loading = false] = params ?? [];
7 const mockedUseLabels = jest.spyOn(useLabelsModule, 'useLabels');
8 mockedUseLabels.mockReturnValue([value, loading]);
10 return mockedUseLabels;