]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commitdiff
fix(test): remove redundant standardCleanup() from nested afterEach
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 1 Mar 2026 01:08:26 +0000 (02:08 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 1 Mar 2026 01:10:02 +0000 (02:10 +0100)
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.

tests/charging-station/ocpp/auth/adapters/OCPP20AuthAdapter.test.ts
tests/charging-station/ui-server/UIHttpServer.test.ts

index cc6feba5998402a0b4b242dc1bd1cfe941b90942..73ee696a5bb1ac34627c4795482548ec2834dfa9 100644 (file)
@@ -406,7 +406,6 @@ await describe('OCPP20AuthAdapter', async () => {
     })
 
     afterEach(() => {
-      standardCleanup()
       mock.reset()
     })
 
index 8a36beeda3ea3e7d83bb963e344275c56dfc0e3d..978a5c8d74ea8a3278ad7100c567a5ba5a8a711e 100644 (file)
@@ -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()