]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
fix(tests): address audit findings — assertion consistency, JSDoc, DRY, try/finally
authorJérôme Benoit <jerome.benoit@sap.com>
Tue, 3 Mar 2026 20:26:08 +0000 (21:26 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Tue, 3 Mar 2026 20:29:29 +0000 (21:29 +0100)
commitf5e3826b3d47dda25a30cba0b38be43d584e544e
tree031516e4dd7b6c9016acf969abaff19780a34d52
parent452319c9d0759d33e3e4021f8e624fa72f12b5a1
fix(tests): address audit findings — assertion consistency, JSDoc, DRY, try/finally

- Replace expect(a === b).toBe(false) with expect(a).not.toBe(b) (IdTagsCache)
- Add explicit assertions to smoke tests (SimpleHandlers)
- Wrap state injection in try/finally (Configuration)
- Extract createStationWithRequestHandler helper, use mock.method() (connectorStatus)
- Fill empty JSDoc @param descriptions across 5 files
- Rename makeStationStub → makeStationMock, merge duplicate import (pure)
- Fix misleading test name 'is empty' → 'is null' (validation)
- Extract getConnectorStatus/getHandleStartTransactionResponse helpers (ATG)
- Fix perfectionist/sort-modules and sort-imports ordering
tests/charging-station/AutomaticTransactionGenerator.test.ts
tests/charging-station/IdTagsCache.test.ts
tests/charging-station/SharedLRUCache.test.ts
tests/charging-station/ocpp/2.0/OCPP20ResponseService-SimpleHandlers.test.ts
tests/charging-station/ocpp/OCPPServiceUtils-authorization.test.ts
tests/charging-station/ocpp/OCPPServiceUtils-connectorStatus.test.ts
tests/charging-station/ocpp/OCPPServiceUtils-pure.test.ts
tests/charging-station/ocpp/OCPPServiceUtils-validation.test.ts
tests/utils/Configuration.test.ts