diff --git a/server/tests/integration/bootstrap.test.ts b/server/tests/integration/bootstrap.test.ts index 25019f2a2..ff093b8b4 100644 --- a/server/tests/integration/bootstrap.test.ts +++ b/server/tests/integration/bootstrap.test.ts @@ -43,6 +43,7 @@ import { resetTestDb } from '../helpers/test-db'; import { createUser } from '../helpers/factories'; import { authCookie } from '../helpers/auth'; import { buildApp } from '../../src/bootstrap'; +import { UnitOfWork } from '../../src/nest/database/unit-of-work'; describe('BOOTSTRAP (F6) — unified NestJS app serves the whole surface', () => { let app: INestApplication; @@ -125,4 +126,8 @@ describe('BOOTSTRAP (F6) — unified NestJS app serves the whole surface', () => expect(res.status).toBe(200); expect(res.headers['content-encoding']).toBe('gzip'); }); + + it('BOOTSTRAP-ORM-001: the ORM unit of work resolves from the container', () => { + expect(app.get(UnitOfWork)).toBeInstanceOf(UnitOfWork); + }); }); diff --git a/server/vitest.config.ts b/server/vitest.config.ts index 86f98602e..5900eec1c 100644 --- a/server/vitest.config.ts +++ b/server/vitest.config.ts @@ -159,6 +159,9 @@ export default defineConfig({ // zero asserts nothing. It needs tests before it needs a threshold. 'src/app-config/**/*.ts': { statements: 99, branches: 95, functions: 99, lines: 99 }, 'src/db/**/*.ts': { statements: 73, branches: 38, functions: 59, lines: 80 }, + 'src/db/dialect/**/*.ts': { statements: 99, branches: 99, functions: 99, lines: 99 }, + 'src/db/repositories/**/*.ts': { statements: 99, branches: 99, functions: 99, lines: 99 }, + 'src/db/types/**/*.ts': { statements: 89, branches: 83, functions: 99, lines: 89 }, 'src/mcp/**/*.ts': { statements: 58, branches: 43, functions: 63, lines: 60 }, 'src/middleware/**/*.ts': { statements: 91, branches: 89, functions: 87, lines: 94 }, // The folded-in nest-mcp decorator/registry layer keeps the 80% floor