From ad1826d32dc139997a4b4b40b77aecbe2e0287e5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 27 Feb 2026 18:44:35 +0100 Subject: [PATCH] fix(tests): move ocppVersion inside stationInfo in auth mock factory The mock factory was placing ocppVersion at the root level of the mock ChargingStation, but AuthComponentFactory.createAdapters() looks for chargingStation.stationInfo?.ocppVersion, causing all auth service tests to fail with 'OCPP version not found in charging station' error. --- tests/charging-station/ocpp/auth/helpers/MockFactories.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/charging-station/ocpp/auth/helpers/MockFactories.ts b/tests/charging-station/ocpp/auth/helpers/MockFactories.ts index 80396d88..5e5b2382 100644 --- a/tests/charging-station/ocpp/auth/helpers/MockFactories.ts +++ b/tests/charging-station/ocpp/auth/helpers/MockFactories.ts @@ -297,10 +297,10 @@ export const createMockAuthServiceTestStation = ( idTagLocalAuthorized: () => false, isConnected: () => true, logPrefix: () => `[TEST-CS-${id}]`, - ocppVersion, sendRequest: () => Promise.resolve({}), stationInfo: { chargingStationId: `TEST-CS-${id}`, hashId: `test-hash-${id}`, + ocppVersion, }, }) as unknown as ChargingStation -- 2.53.0