test(server): plan 4 — collapse remaining test harnesses; triage legacy migration tests

This commit is contained in:
jubnl
2026-09-24 07:32:46 +02:00
parent e149db270b
commit bf8b06d71b
35 changed files with 1086 additions and 1201 deletions
+2 -2
View File
@@ -9,7 +9,7 @@
*/
import { describe, it, expect, beforeAll, beforeEach, afterAll } from 'vitest';
import { createSnapshotTestDb } from '../../helpers/db-mock';
import { CAN_ACCESS_TRIP_SQL, buildDbMock, createTestDb, resetTestDb } from '../../helpers/test-db';
import { CAN_ACCESS_TRIP_SQL, buildDbMock, resetTestDb } from '../../helpers/test-db';
import { createTestOrm, type TestOrm } from '../../helpers/test-orm';
import { Trips } from '../../../src/db/entities/Trips.entity';
import type { TripsRepository } from '../../../src/db/repositories/Trips.repository';
@@ -81,7 +81,7 @@ describe('TripsRepository.findAccessible (formerly canAccessTrip)', () => {
*/
describe('the buildDbMock stand-in for canAccessTrip', () => {
it('hands back the trip currency, like the real one', async () => {
const dbmockDb = createTestDb();
const dbmockDb = createSnapshotTestDb();
try {
const owner = Number(
dbmockDb.prepare("INSERT INTO users (username, email, password_hash, role) VALUES ('m', 'm@example.test', 'x', 'user')")