lootsa tests fixes
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 4m29s

This commit is contained in:
2025-12-05 18:56:08 -08:00
parent e07b0c6ae4
commit 57ea82a8ad
7 changed files with 149 additions and 10 deletions

View File

@@ -1,7 +1,7 @@
// src/services/db/user.db.test.ts
import { describe, it, expect, vi, beforeEach } from 'vitest';
// Un-mock the module we are testing to ensure we use the real implementation.
// FIX 2: Un-mock the module we are testing to ensure we use the real implementation.
vi.unmock('./user.db');
import {
@@ -25,14 +25,15 @@ import {
getUserFeed,
logSearchQuery,
} from './user.db';
import { mockPoolInstance } from '../../tests/setup/tests-setup-unit';
import type { Profile } from '../../types';
// Mock other db services that are used by functions in user.db.ts
vi.mock('./shopping', () => ({
vi.mock('./shopping.db', () => ({
getShoppingLists: vi.fn(),
}));
vi.mock('./personalization', () => ({
vi.mock('./personalization.db', () => ({
getWatchedItems: vi.fn(),
}));