ensure mocks are used wherever possible, more test fixes
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 1h7m5s
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 1h7m5s
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 } from '../tests/utils/mockFactories';
|
||||
import { createMockMasterGroceryItem, createMockUser } from '../tests/utils/mockFactories';
|
||||
|
||||
// Mock the hooks that useWatchedItems depends on
|
||||
vi.mock('./useApi');
|
||||
@@ -20,7 +20,7 @@ const mockedUseApi = vi.mocked(useApi);
|
||||
const mockedUseAuth = vi.mocked(useAuth);
|
||||
const mockedUseUserData = vi.mocked(useUserData);
|
||||
|
||||
const mockUser: User = { user_id: 'user-123', email: 'test@example.com' };
|
||||
const mockUser: User = createMockUser({ user_id: 'user-123', email: 'test@example.com' });
|
||||
const mockInitialItems = [
|
||||
createMockMasterGroceryItem({ master_grocery_item_id: 1, name: 'Milk' }),
|
||||
createMockMasterGroceryItem({ master_grocery_item_id: 2, name: 'Bread' }),
|
||||
|
||||
Reference in New Issue
Block a user