From f2304e076b0cb7fec1401ecc618f295e960ce296 Mon Sep 17 00:00:00 2001 From: Maurice Date: Thu, 2 Jul 2026 17:45:14 +0200 Subject: [PATCH] test(maps): add buildUserAgent to the mapsService mock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit transitService imports it at module load, and the full-app integration boot now pulls the transit module in — the factory mock lacked the export. --- server/tests/integration/maps.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/tests/integration/maps.test.ts b/server/tests/integration/maps.test.ts index 0b95e9d95..1540b30cd 100644 --- a/server/tests/integration/maps.test.ts +++ b/server/tests/integration/maps.test.ts @@ -57,6 +57,8 @@ vi.mock('../../src/services/mapsService', () => ({ resolveGoogleMapsUrl: vi.fn().mockRejectedValue( Object.assign(new Error('SSRF or invalid URL'), { status: 400 }) ), + // Imported at module load by transitService (pulled in via app.module). + buildUserAgent: () => 'TREK-Test-UA', })); import { buildApp } from '../../src/bootstrap';