fix(lint&types): resolve all lint warnings, typecheck errors and effect state updates across frontend application and admin panel
This commit is contained in:
1 parent
920dd532e8
commit
c1b2f416ed
29 files changed
+442
-352
No files matched your search
@@ -25,21 +25,21 @@ describe('Header', () => {
|
||||
|
||||
vi.mocked(useCartStore).mockReturnValue({
|
||||
getTotalItems: () => 3,
|
||||
} as any);
|
||||
} as unknown as ReturnType<typeof useCartStore>);
|
||||
|
||||
vi.mocked(usePetStore).mockReturnValue({
|
||||
pets: [],
|
||||
activePetId: null,
|
||||
setActivePet: vi.fn(),
|
||||
getActivePet: () => null,
|
||||
} as any);
|
||||
} as unknown as ReturnType<typeof usePetStore>);
|
||||
|
||||
vi.mocked(useUserStore).mockReturnValue({
|
||||
role: 'User_Guest',
|
||||
isLoggedIn: false,
|
||||
logout: vi.fn(),
|
||||
profile: { firstName: '' },
|
||||
} as any);
|
||||
} as unknown as ReturnType<typeof useUserStore>);
|
||||
});
|
||||
|
||||
it('renders brand name and login button when guest', () => {
|
||||
@@ -65,14 +65,14 @@ describe('Header', () => {
|
||||
isLoggedIn: true,
|
||||
logout: vi.fn(),
|
||||
profile: { firstName: 'کوروش' },
|
||||
} as any);
|
||||
} as unknown as ReturnType<typeof useUserStore>);
|
||||
|
||||
vi.mocked(usePetStore).mockReturnValue({
|
||||
pets: [{ id: 'pet-1', name: 'ملوس', type: 'گربه' }],
|
||||
activePetId: 'pet-1',
|
||||
setActivePet: vi.fn(),
|
||||
getActivePet: () => ({ id: 'pet-1', name: 'ملوس', type: 'گربه' }),
|
||||
} as any);
|
||||
} as unknown as ReturnType<typeof usePetStore>);
|
||||
|
||||
render(
|
||||
<Header
|
||||
|
||||
Reference in new issue
Block a user