]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
test: add afterEach cleanup to all test files
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 27 Feb 2026 22:14:12 +0000 (23:14 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 27 Feb 2026 22:14:12 +0000 (23:14 +0100)
commitc1b95df9c3f15e669d0567aef94afcf1e17ded30
treec49159b2a9c1a8252896b8eef5fc63b0d5bcbf03
parentf146ae6b7443226b7e29dedcc9d55ed2810ee032
test: add afterEach cleanup to all test files

Add afterEach with mock.restoreAll() to 27 test files.
Ensures 100% coverage for mock cleanup (63/63 files).
Prevents test pollution between test runs.
Follows TEST_STYLE_GUIDE.md standards.
28 files changed:
tests/ChargingStationFactory.test.ts
tests/charging-station/ConfigurationKeyUtils.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-CertificateSigned.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-ClearCache.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-DeleteCertificate.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetInstalledCertificateIds.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-InstallCertificate.test.ts
tests/charging-station/ocpp/2.0/OCPP20RequestService-BootNotification.test.ts
tests/charging-station/ocpp/2.0/OCPP20RequestService-HeartBeat.test.ts
tests/charging-station/ocpp/2.0/OCPP20RequestService-ISO15118.test.ts
tests/charging-station/ocpp/2.0/OCPP20RequestService-NotifyReport.test.ts
tests/charging-station/ocpp/2.0/OCPP20RequestService-SignCertificate.test.ts
tests/charging-station/ocpp/2.0/OCPP20RequestService-StatusNotification.test.ts
tests/charging-station/ocpp/auth/types/AuthTypes.test.ts
tests/charging-station/ocpp/auth/utils/AuthHelpers.test.ts
tests/charging-station/ocpp/auth/utils/AuthValidators.test.ts
tests/charging-station/ocpp/auth/utils/ConfigValidator.test.ts
tests/charging-station/ui-server/UIHttpServer.test.ts
tests/charging-station/ui-server/UIServerSecurity.test.ts
tests/charging-station/ui-server/UIWebSocketServer.test.ts
tests/charging-station/ui-server/ui-services/AbstractUIService.test.ts
tests/exception/BaseError.test.ts
tests/exception/OCPPError.test.ts
tests/helpers/TestLifecycleHelpers.ts
tests/types/ConfigurationData.test.ts
tests/utils/AsyncLock.test.ts
tests/utils/ElectricUtils.test.ts
tests/utils/StatisticUtils.test.ts