mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 05:26:47 +00:00
fa0edfd714
A hand-built service gets a FakeRealtimeService where it took a RealtimeService, a Nest testing module overrides the provider, and a suite over buildApp() spies on the container's instance (spyOnRealtime). The 167 vi.mock factories on src/websocket are gone, RealtimeService reads the socket registry in ws-state.ts directly, and the re-export stub src/websocket.ts is deleted. The facade's own suite now checks what reaches a socket instead of which module function it called.
21 lines
907 B
TypeScript
21 lines
907 B
TypeScript
/**
|
||
* B1 (Plan 4 final review): an install the retired positional runner migrated
|
||
* to schema_version 82 boots on this release — tag v2.9.14, so seven of the eight migrations that are not replay-safe (steps 90–127) still lie ahead of it and must run for the first time rather than be skipped.
|
||
* The assertions live in tests/helpers/legacy-upgrade-suite.ts.
|
||
*/
|
||
import { db as legacyDb } from '../../src/db/database';
|
||
import { describeLegacyUpgrade } from '../helpers/legacy-upgrade-suite';
|
||
|
||
import { vi } from 'vitest';
|
||
|
||
vi.mock('../../src/db/database', async () => {
|
||
const { buildDbMock } = await import('../helpers/db-mock');
|
||
const { openLegacyFixture } = await import('../helpers/legacy-fixture');
|
||
return buildDbMock(openLegacyFixture('legacy-v082'));
|
||
});
|
||
|
||
describeLegacyUpgrade(
|
||
{ fixture: 'legacy-v082', version: 82, reseated: 1, nightOrderIndex: 1, id: 'LEGACYUP-082' },
|
||
legacyDb,
|
||
);
|