]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
refactor(tests): move mock creation from it() to beforeEach()
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 28 Feb 2026 17:05:27 +0000 (18:05 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 28 Feb 2026 17:05:27 +0000 (18:05 +0100)
commit1a91a64fdb3c76a5cbdac8d3d9effb7849a8b86a
treea3b85c5b91ccde4ad5c20c39f5a442acacfb5785
parent454427f5cd65568d839e1fd3ba201ed52eadef16
refactor(tests): move mock creation from it() to beforeEach()

- Refactor OCPPAuthServiceImpl.test.ts: declare mocks at describe level, initialize in beforeEach()
- Refactor OCPPAuthServiceFactory.test.ts: same pattern for consistency
- Refactor InMemoryAuthCache.test.ts: move common mockResult to beforeEach()

Aligns with TEST_STYLE_GUIDE.md recommendation for test isolation pattern.
tests/charging-station/ocpp/auth/cache/InMemoryAuthCache.test.ts
tests/charging-station/ocpp/auth/services/OCPPAuthServiceFactory.test.ts
tests/charging-station/ocpp/auth/services/OCPPAuthServiceImpl.test.ts