]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
refactor(tests): add mock factories to eliminate test duplication
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 27 Feb 2026 15:45:27 +0000 (16:45 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 27 Feb 2026 15:45:27 +0000 (16:45 +0100)
commit2845ec5e39b5217694a76b32ce8261a06e3ad9e2
tree4e9eca0aa5a5b4340448c92198ee5edeedad59be
parentec00906cc95779c5c51df39eb84210eb25d6d0d6
refactor(tests): add mock factories to eliminate test duplication

- Add createMockAuthServiceTestStation() to MockFactories.ts
- Add createMockOCPP20TransactionTestStation() to OCPP20TestUtils.ts
- Replace 19 inline mocks in OCPPAuthServiceImpl.test.ts
- Replace inline setup in 3 OCPP 2.0 transaction test files
tests/charging-station/ChargingStation.test.ts
tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-TransactionEvent-CableFirst.test.ts
tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-TransactionEvent-IdTokenFirst.test.ts
tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-TransactionEvent.test.ts
tests/charging-station/ocpp/2.0/OCPP20TestUtils.ts
tests/charging-station/ocpp/auth/helpers/MockFactories.ts
tests/charging-station/ocpp/auth/services/OCPPAuthServiceImpl.test.ts