mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-21 14:36:31 +00:00
test(client): drop the mocks of the deleted server database service
server/src/nest/database/database.service no longer exists, so the five vi.mock calls that guarded against importing it guarded nothing.
This commit is contained in:
@@ -13,7 +13,6 @@ vi.mock('../shared/Toast', () => ({ useToast: () => toast }))
|
||||
|
||||
vi.mock('../../../../server/src/config', () => { throw new Error('Config initialization is forbidden in client tests') })
|
||||
vi.mock('../../../../server/src/db/database', () => { throw new Error('Legacy database imports are forbidden in client tests') })
|
||||
vi.mock('../../../../server/src/nest/database/database.service', () => { throw new Error('Database service imports are forbidden in client tests') })
|
||||
vi.mock('better-sqlite3', () => { throw new Error('SQLite imports are forbidden in client tests') })
|
||||
|
||||
const tour: TourListItem = {
|
||||
|
||||
@@ -5,7 +5,6 @@ import { render, screen } from '../../../../tests/helpers/render'
|
||||
|
||||
vi.mock('../../../../../server/src/config', () => { throw new Error('Config initialization is forbidden in client tests') })
|
||||
vi.mock('../../../../../server/src/db/database', () => { throw new Error('Legacy database imports are forbidden in client tests') })
|
||||
vi.mock('../../../../../server/src/nest/database/database.service', () => { throw new Error('Database service imports are forbidden in client tests') })
|
||||
vi.mock('better-sqlite3', () => { throw new Error('SQLite imports are forbidden in client tests') })
|
||||
|
||||
const { routeWalkingTour, enrichTourElevations, createTour, detailTour, updateTour } = vi.hoisted(() => ({
|
||||
|
||||
@@ -15,7 +15,6 @@ import type { TourPlannerController } from './planner/useTourPlanner'
|
||||
|
||||
vi.mock('../../../../server/src/config', () => { throw new Error('Config initialization is forbidden in client tests') })
|
||||
vi.mock('../../../../server/src/db/database', () => { throw new Error('Legacy database imports are forbidden in client tests') })
|
||||
vi.mock('../../../../server/src/nest/database/database.service', () => { throw new Error('Database service imports are forbidden in client tests') })
|
||||
vi.mock('better-sqlite3', () => { throw new Error('SQLite imports are forbidden in client tests') })
|
||||
|
||||
const tour: TourListItem = {
|
||||
|
||||
@@ -4,7 +4,6 @@ import type { TourListItem } from '@trek/shared'
|
||||
|
||||
vi.mock('../../../../server/src/config', () => { throw new Error('Config initialization is forbidden in client tests') })
|
||||
vi.mock('../../../../server/src/db/database', () => { throw new Error('Legacy database imports are forbidden in client tests') })
|
||||
vi.mock('../../../../server/src/nest/database/database.service', () => { throw new Error('Database service imports are forbidden in client tests') })
|
||||
vi.mock('better-sqlite3', () => { throw new Error('SQLite imports are forbidden in client tests') })
|
||||
|
||||
const state = vi.hoisted(() => ({
|
||||
|
||||
@@ -6,7 +6,6 @@ import { test, vi } from 'vitest'
|
||||
|
||||
vi.mock('../../../../server/src/config', () => { throw new Error('Config initialization is forbidden in static tests') })
|
||||
vi.mock('../../../../server/src/db/database', () => { throw new Error('Legacy database imports are forbidden in static tests') })
|
||||
vi.mock('../../../../server/src/nest/database/database.service', () => { throw new Error('Database service imports are forbidden in static tests') })
|
||||
vi.mock('better-sqlite3', () => { throw new Error('SQLite imports are forbidden in static tests') })
|
||||
|
||||
const pagePath = 'client/src/pages/TripPlannerPage.tsx'
|
||||
|
||||
Reference in New Issue
Block a user