]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
fix(tests): add second flushMicrotasks for RequestStopTransaction listener
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 16 Mar 2026 21:56:52 +0000 (22:56 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 16 Mar 2026 22:19:37 +0000 (23:19 +0100)
commit7cd726e1cb5a37bee91f873b771c5a12231ad4b3
treefe4330a473225bd8fc5a4a485d85cf0cb6022521
parent66351458ed4df9437189439031521e7314887b6f
fix(tests): add second flushMicrotasks for RequestStopTransaction listener

The async chain in requestStopTransaction traverses a dynamic import()
in checkConnectorStatusTransition (OCPPServiceUtils), which may resolve
after the first setImmediate on macOS + Node 22. A second flush ensures
the StatusNotification call completes before the assertion.
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-RequestStopTransaction.test.ts