chore: import DH V2 D5.6.4 production baseline

This commit is contained in:
DH V2
2026-09-05 10:12:35 -03:00
commit 82213e72f5
757 changed files with 84218 additions and 0 deletions
@@ -0,0 +1,22 @@
import assert from 'node:assert/strict';
import test from 'node:test';
import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';
const source = readFileSync(resolve(process.cwd(), 'src/inspection-findings/inspection-findings.service.ts'), 'utf8');
const controller = readFileSync(resolve(process.cwd(), 'src/inspection-findings/inspection-findings.controller.ts'), 'utf8');
test('D5.3.13 separates company response due dates from verification due dates', () => {
assert.match(source, /correction_due_on IS NOT NULL AND correction_due_on/);
assert.match(source, /company_response_received_on IS NOT NULL AND next_control_on/);
assert.match(source, /companyOverdue/);
assert.match(source, /verificationOverdue/);
});
test('D5.3.13 exposes a global office queue and controlled finding closure', () => {
assert.match(controller, /@Get\(\)/);
assert.match(controller, /this\.findings\.listGlobal\(query\)/);
assert.match(controller, /@Patch\(':id\/close'\)/);
assert.match(source, /finding\.status = InspectionFindingStatus\.CLOSED/);
assert.match(source, /finding\.closureNotes = dto\.closureNotes/);
});