From cee36fe440c0680876af94e55aadb369c3b1bf2c Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 1 Mar 2026 02:08:26 +0100 Subject: [PATCH] fix(test): remove redundant standardCleanup() from nested afterEach UIHttpServer and OCPP20AuthAdapter tests had nested describes with afterEach blocks calling standardCleanup(), duplicating the outer afterEach cleanup. This could cause mock.restoreAll() to be called twice per test, potentially causing issues on Windows. --- .../ocpp/auth/adapters/OCPP20AuthAdapter.test.ts | 1 - tests/charging-station/ui-server/UIHttpServer.test.ts | 4 ---- 2 files changed, 5 deletions(-) diff --git a/tests/charging-station/ocpp/auth/adapters/OCPP20AuthAdapter.test.ts b/tests/charging-station/ocpp/auth/adapters/OCPP20AuthAdapter.test.ts index cc6feba5..73ee696a 100644 --- a/tests/charging-station/ocpp/auth/adapters/OCPP20AuthAdapter.test.ts +++ b/tests/charging-station/ocpp/auth/adapters/OCPP20AuthAdapter.test.ts @@ -406,7 +406,6 @@ await describe('OCPP20AuthAdapter', async () => { }) afterEach(() => { - standardCleanup() mock.reset() }) diff --git a/tests/charging-station/ui-server/UIHttpServer.test.ts b/tests/charging-station/ui-server/UIHttpServer.test.ts index 8a36beed..978a5c8d 100644 --- a/tests/charging-station/ui-server/UIHttpServer.test.ts +++ b/tests/charging-station/ui-server/UIHttpServer.test.ts @@ -194,10 +194,6 @@ await describe('UIHttpServer', async () => { gzipServer = new TestableUIHttpServer(createHttpServerConfig()) }) - afterEach(() => { - standardCleanup() - }) - await it('should skip compression when acceptsGzip is false', () => { const res = new MockServerResponse() -- 2.43.0