lootsa tests fixes
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 4m29s
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 4m29s
This commit is contained in:
@@ -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(),
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user