test(db): coverage ratchet entries for the ORM foundation

This commit is contained in:
jubnl
2026-09-21 11:01:44 +02:00
parent 418bd1c6b5
commit f0c6cd18b3
2 changed files with 8 additions and 0 deletions
@@ -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);
});
});
+3
View File
@@ -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