From: Jérôme Benoit Date: Mon, 16 Mar 2026 22:24:19 +0000 (+0100) Subject: fix(tests): remove unnecessary double flushMicrotasks in skipped test X-Git-Tag: ocpp-server@v3.1.1~4 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=9653bc1e0d81648aee1ba2a2213d36c0de7c47b3;p=e-mobility-charging-stations-simulator.git fix(tests): remove unnecessary double flushMicrotasks in skipped test --- diff --git a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-RequestStopTransaction.test.ts b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-RequestStopTransaction.test.ts index 63939a92..51e842e8 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-RequestStopTransaction.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-RequestStopTransaction.test.ts @@ -267,10 +267,6 @@ await describe('F03 - Remote Stop Transaction', async () => { response ) - // Two flushes needed: the async chain in requestStopTransaction traverses a - // dynamic import() in checkConnectorStatusTransition, which may resolve after - // the first setImmediate on some platforms (observed on macOS + Node 22). - await flushMicrotasks() await flushMicrotasks() assert.strictEqual(requestHandlerMock.mock.callCount(), 2)