]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
refactor: audit-driven quick wins — fix assert.ok misuse, naming conventions, and... main
authorJérôme Benoit <jerome.benoit@sap.com>
Tue, 24 Mar 2026 13:46:17 +0000 (14:46 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Tue, 24 Mar 2026 13:46:17 +0000 (14:46 +0100)
commit901296a93b8f4b195acd355bf4846e2ac08fdc14
tree95469256561f4d9e0aebfc2ee0187bffa1379e2b
parentfcd3b8ee439a66294448cd354ff5a99eb1e020a4
refactor: audit-driven quick wins — fix assert.ok misuse, naming conventions, and hardcoded defaults

- Replace 71 improper assert.ok(comparison) with assert.strictEqual/notStrictEqual
  in 10 test files per TEST_STYLE_GUIDE (assert.ok for boolean/existence only)
- Rename lastUpdated → lastUpdatedDate in auth interfaces and strategies
  to follow Date suffix naming convention
- Extract hardcoded 'ws://localhost' to OCPP20Constants.DEFAULT_CONNECTION_URL
- Replace setTimeout(resolve, 50) with proper httpServer.close() await
  in UIMCPServer integration test
17 files changed:
src/charging-station/ocpp/2.0/OCPP20Constants.ts
src/charging-station/ocpp/2.0/OCPP20VariableRegistry.ts
src/charging-station/ocpp/auth/interfaces/OCPPAuthService.ts
src/charging-station/ocpp/auth/services/OCPPAuthServiceImpl.ts
src/charging-station/ocpp/auth/strategies/LocalAuthStrategy.ts
src/charging-station/ocpp/auth/strategies/RemoteAuthStrategy.ts
tests/charging-station/ChargingStation-Configuration.test.ts
tests/charging-station/ChargingStation-Connectors.test.ts
tests/charging-station/ChargingStation-Resilience.test.ts
tests/charging-station/ChargingStation-Transactions.test.ts
tests/charging-station/ChargingStation.test.ts
tests/charging-station/ocpp/auth/helpers/MockFactories.ts
tests/charging-station/ui-server/UIMCPServer.integration.test.ts
tests/exception/BaseError.test.ts
tests/utils/ChargingStationConfigurationUtils.test.ts
tests/utils/Utils.test.ts
tests/worker/WorkerUtils.test.ts