From 1aa586d829fcf721562bbe7964fa2567065847f1 Mon Sep 17 00:00:00 2001 From: Maurice Date: Fri, 13 Nov 2026 19:20:09 +0100 Subject: [PATCH] test: type fixes the CI typecheck found, and the lowered test-new-service baseline - mailInboxModel.test: actionsOf takes the entry alone since the AI reread left. - booking-origin.test: its endpoint helper gives the sequence an endpoint has. - test-new-service baseline follows booking-import's single service factory. --- client/src/components/MailIngest/mailInboxModel.test.ts | 5 +---- server/scripts/test-new-service-baseline.json | 2 +- server/tests/unit/nest/booking-import/booking-origin.test.ts | 3 ++- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/client/src/components/MailIngest/mailInboxModel.test.ts b/client/src/components/MailIngest/mailInboxModel.test.ts index 24e8f0df6..257faecd1 100644 --- a/client/src/components/MailIngest/mailInboxModel.test.ts +++ b/client/src/components/MailIngest/mailInboxModel.test.ts @@ -69,10 +69,7 @@ describe('mailInboxModel', () => { it('FE-MAILINBOX-MODEL-004: a forwarding confirmation or a newsletter only informs', () => { expect( - actionsOf( - entry({ item: null, reason: null }, { reason: 'forwarding_confirmation', forwarding_code: '123456' }), - true - ) + actionsOf(entry({ item: null, reason: null }, { reason: 'forwarding_confirmation', forwarding_code: '123456' })) ).toEqual(['discard']); }); diff --git a/server/scripts/test-new-service-baseline.json b/server/scripts/test-new-service-baseline.json index 88ce6909e..2c665ccbc 100644 --- a/server/scripts/test-new-service-baseline.json +++ b/server/scripts/test-new-service-baseline.json @@ -47,7 +47,7 @@ "tests/unit/nest/auth.controller.test.ts": 1, "tests/unit/nest/auth.service.test.ts": 9, "tests/unit/nest/backup.controller.test.ts": 1, - "tests/unit/nest/booking-import/booking-import.service.test.ts": 3, + "tests/unit/nest/booking-import/booking-import.service.test.ts": 1, "tests/unit/nest/booking-import/import-jobs.service.test.ts": 1, "tests/unit/nest/booking-import/kitinerary-extractor.service.test.ts": 1, "tests/unit/nest/budget.service.calc.test.ts": 1, diff --git a/server/tests/unit/nest/booking-import/booking-origin.test.ts b/server/tests/unit/nest/booking-import/booking-origin.test.ts index c4cce968e..6c6abf13c 100644 --- a/server/tests/unit/nest/booking-import/booking-origin.test.ts +++ b/server/tests/unit/nest/booking-import/booking-origin.test.ts @@ -10,8 +10,9 @@ const item = (fields: Partial): BookingImportPreviewIt ...fields, }); -const endpoint = (role: string, name: string, code: string | null) => ({ +const endpoint = (role: 'from' | 'to', name: string, code: string | null) => ({ role, + sequence: role === 'from' ? 0 : 1, name, code, lat: 0,