]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
fix(test-isolation): move mock creation to beforeEach in CableFirst test
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 28 Feb 2026 15:36:56 +0000 (16:36 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 28 Feb 2026 15:36:56 +0000 (16:36 +0100)
commit5df3524f59efb16d19d0d69c117dc188cb036f57
treecaa104dc2cfdefb375ceae4c7e1bac3b880c14e6
parent950460d07dca174b4d474b0c926d0157c3664ee4
fix(test-isolation): move mock creation to beforeEach in CableFirst test

- Move mockChargingStation initialization from module level to beforeEach()
- Declare mockChargingStation as let at describe scope per TEST_STYLE_GUIDE.md
- Ensures each test receives fresh mock instances
- Fixes CRITICAL test isolation violation per test audit
- All 12 tests in E02 - Cable-First Transaction Flow pass
tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-TransactionEvent-CableFirst.test.ts