]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
refactor(tests): extract hardcoded values to constants
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 3 Apr 2026 17:36:08 +0000 (19:36 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 3 Apr 2026 17:36:48 +0000 (19:36 +0200)
commit7c477d252ce4529cf4b257c225f7c7da6a5f4b34
treea827d45256f8c14a1e39e24c9e09ad6b8f4d8cb7
parenta032785f1f0b7a9bac07decf597c3cc9ad8b0936
refactor(tests): extract hardcoded values to constants

- extract TEST_TIMEOUT_MS constant for 9 setTimeout(30000) calls in
  UIMCPServer.test.ts
- use Constants.DEFAULT_ATG_CONFIGURATION instead of inline ATG config
  objects in SharedLRUCache, ChargingStationConfigurationUtils, and
  AutomaticTransactionGenerator tests
- add TEST_RESERVATION_EXPIRY_MS constant and replace 6 hardcoded
  3600000 values in reservation and transaction tests
tests/charging-station/AutomaticTransactionGenerator.test.ts
tests/charging-station/ChargingStationTestConstants.ts
tests/charging-station/SharedLRUCache.test.ts
tests/charging-station/ocpp/1.6/OCPP16IncomingRequestService-Reservation.test.ts
tests/charging-station/ocpp/1.6/OCPP16ResponseService-Transactions.test.ts
tests/charging-station/ui-server/UIMCPServer.test.ts
tests/utils/ChargingStationConfigurationUtils.test.ts