large mock refector hopefully done + no errors?
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 1h13m59s

This commit is contained in:
2025-12-21 02:43:03 -08:00
parent 391d00ae15
commit c49e5f7019
77 changed files with 817 additions and 465 deletions

View File

@@ -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(),