]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
fix(test): remove redundant nested afterEach in Reset test causing Windows hang
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 1 Mar 2026 01:05:37 +0000 (02:05 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 1 Mar 2026 01:05:37 +0000 (02:05 +0100)
commit019e3a27c08d720ec2b23462719262ee11371809
tree8f20177839d300bac3371ade52c6933434020e6d
parent543ad7323ece59deeb3780c94c242f3440d0f1af
fix(test): remove redundant nested afterEach in Reset test causing Windows hang

The Reset test had nested describes (B11, B12) with their own afterEach
calling standardCleanup(), plus an outer afterEach calling mock.timers.reset()
then standardCleanup(). This caused mock.restoreAll() to be called twice
per test with timer reset in between - leaving MockTracker in inconsistent
state on Windows.

Also harmonize StationHelpers cleanup to use '= undefined' consistently
instead of mixing with 'delete'.
tests/charging-station/helpers/StationHelpers.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-Reset.test.ts