]> 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 21:56:52 +0000 (22:56 +0100)
commit66351458ed4df9437189439031521e7314887b6f
treeeb7bba1d7095a8ca305fa2529be460b6ed2323d8
parent8eb7710860a4cdb00e0a4ac86d6b633abf604488
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