large mock refector hopefully done + no errors?
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 1h13m59s
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 1h13m59s
This commit is contained in:
@@ -7,7 +7,7 @@ import { useAuth } from '../hooks/useAuth';
|
||||
import { useUserData } from '../hooks/useUserData';
|
||||
import * as apiClient from '../services/apiClient';
|
||||
import type { MasterGroceryItem, User } from '../types';
|
||||
import { createMockMasterGroceryItem, createMockUser } from '../tests/utils/mockFactories';
|
||||
import { createMockMasterGroceryItem, createMockUser, createMockUserProfile } from '../tests/utils/mockFactories';
|
||||
|
||||
// Mock the hooks that useWatchedItems depends on
|
||||
vi.mock('./useApi');
|
||||
@@ -54,8 +54,7 @@ describe('useWatchedItems Hook', () => {
|
||||
|
||||
// Provide a default implementation for the mocked hooks
|
||||
mockedUseAuth.mockReturnValue({
|
||||
user: mockUser,
|
||||
profile: null,
|
||||
userProfile: createMockUserProfile({ user: mockUser }),
|
||||
authStatus: 'AUTHENTICATED',
|
||||
isLoading: false,
|
||||
login: vi.fn(),
|
||||
@@ -246,8 +245,7 @@ describe('useWatchedItems Hook', () => {
|
||||
|
||||
it('should not perform actions if the user is not authenticated', async () => {
|
||||
mockedUseAuth.mockReturnValue({
|
||||
user: null,
|
||||
profile: null,
|
||||
userProfile: null,
|
||||
authStatus: 'SIGNED_OUT',
|
||||
isLoading: false,
|
||||
login: vi.fn(),
|
||||
|
||||
Reference in New Issue
Block a user