From ef781abacab1652aad9793974d37a0f6a539658f Mon Sep 17 00:00:00 2001 From: enlineawork Date: Tue, 8 Sep 2026 22:05:58 -0300 Subject: [PATCH] test(dashboard): route F5 summary query mocks explicitly --- api-v3/test/unit/dashboard-service.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api-v3/test/unit/dashboard-service.test.ts b/api-v3/test/unit/dashboard-service.test.ts index 52eb926..f206087 100644 --- a/api-v3/test/unit/dashboard-service.test.ts +++ b/api-v3/test/unit/dashboard-service.test.ts @@ -21,8 +21,9 @@ test('DashboardService returns F5 operational counts and inspector activity cons reportsWorking: '1', reportsOfficialized: '2', sealedActsWithoutReport: '4', }]; } - if (sql.includes('FROM inspection_findings finding')) return []; - return recent; + if (sql.includes('FROM audit_events event')) return recent; + if (sql.includes('next_control_on AS "nextControlOn"')) return []; + throw new Error(`Unexpected DashboardService query in test: ${sql}`); }, }; const dataSource = {