chore: import DH V2 D5.6.4 production baseline
This commit is contained in:
@@ -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/);
|
||||
});
|
||||
Reference in New Issue
Block a user