]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
fix(tests): use async mock callbacks for all async method mocks
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 17 Apr 2026 16:16:51 +0000 (18:16 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 17 Apr 2026 16:17:29 +0000 (18:17 +0200)
commit422c08e73486e84c7ba182b6cc2b622eac3586c5
treec7e120f147de57ff43bc1766561fb15ea88c80f8
parent13563536ed7dbef18dc59de0cc6c7940af774211
fix(tests): use async mock callbacks for all async method mocks

Sync functions returning Promises are not behaviorally equivalent to
async functions. Align all 40 mock callbacks across 14 test files to use
async when the real method is async.
14 files changed:
tests/charging-station/ocpp/1.6/OCPP16IncomingRequestService-Firmware.test.ts
tests/charging-station/ocpp/1.6/OCPP16IncomingRequestService-RemoteStopUnlock.test.ts
tests/charging-station/ocpp/1.6/OCPP16Integration-Transactions.test.ts
tests/charging-station/ocpp/1.6/OCPP16RequestService-CallChain.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-CustomerInformation.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetBaseReport.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetLog.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-RequestStartTransaction.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-UpdateFirmware.test.ts
tests/charging-station/ocpp/2.0/OCPP20ResponseService-TransactionEvent.test.ts
tests/charging-station/ocpp/OCPPServiceOperations.test.ts
tests/charging-station/ui-server/UIMCPServer.test.ts
tests/performance/storage/MikroOrmStorage.test.ts
tests/performance/storage/MongoDBStorage.test.ts