]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commitdiff
test: add standardCleanup() and fix import ordering in test files
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 28 Feb 2026 22:18:51 +0000 (23:18 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 28 Feb 2026 22:18:51 +0000 (23:18 +0100)
39 files changed:
tests/charging-station/ConfigurationKeyUtils.test.ts
tests/charging-station/Helpers.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/2.0/OCPP20VariableManager.test.ts
tests/charging-station/ocpp/auth/OCPPAuthIntegration.test.ts
tests/charging-station/ocpp/auth/adapters/OCPP16AuthAdapter.test.ts
tests/charging-station/ocpp/auth/adapters/OCPP20AuthAdapter.test.ts
tests/charging-station/ocpp/auth/cache/InMemoryAuthCache.test.ts
tests/charging-station/ocpp/auth/strategies/CertificateAuthStrategy.test.ts
tests/charging-station/ocpp/auth/strategies/LocalAuthStrategy.test.ts
tests/charging-station/ocpp/auth/strategies/RemoteAuthStrategy.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/types/ConfigurationData.test.ts
tests/utils/AsyncLock.test.ts
tests/utils/ConfigurationUtils.test.ts
tests/utils/ElectricUtils.test.ts
tests/utils/ErrorUtils.test.ts
tests/utils/StatisticUtils.test.ts
tests/utils/Utils.test.ts
tests/worker/WorkerUtils.test.ts

index e517e3b7f13859107bc66eedf8d5210dbf067757..f0b6191a50e676e81825be90dbdf825b1008b1c7 100644 (file)
@@ -14,6 +14,7 @@ import {
   setConfigurationKeyValue,
 } from '../../src/charging-station/ConfigurationKeyUtils.js'
 import { logger } from '../../src/utils/Logger.js'
+import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
 import { createMockChargingStation } from './ChargingStationTestUtils.js'
 
 const TEST_KEY_1 = 'TestKey1'
@@ -21,8 +22,9 @@ const MIXED_CASE_KEY = 'MiXeDkEy'
 const VALUE_A = 'ValueA'
 const VALUE_B = 'ValueB'
 
-await describe('ConfigurationKeyUtils test suite', async () => {
+await describe('ConfigurationKeyUtils', async () => {
   afterEach(() => {
+    standardCleanup()
     mock.restoreAll()
   })
   await describe('getConfigurationKey()', async () => {
index 3c8f32b1ce7d82f4a70a5cb1f8034ca451db9cab..8e9cd75f05b598f1d0e2b5b0fa0627f7b84c2b5d 100644 (file)
@@ -39,7 +39,7 @@ import {
   createMockChargingStationTemplate,
 } from './ChargingStationTestUtils.js'
 
-await describe('Helpers test suite', async () => {
+await describe('Helpers', async () => {
   const baseName = 'CS-TEST'
   const chargingStationTemplate = createMockChargingStationTemplate(baseName)
 
index 1859e14e5385ff6b0624f3b1c0a5d622f2789c6c..dc8842207957f3906b0e17a497e06c15a9138ea6 100644 (file)
@@ -18,6 +18,7 @@ import {
   OCPPVersion,
 } from '../../../../src/types/index.js'
 import { Constants } from '../../../../src/utils/index.js'
+import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
 import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js'
 import { createMockChargingStation } from '../../ChargingStationTestUtils.js'
 import { createMockCertificateManager } from './OCPP20TestUtils.js'
@@ -83,6 +84,7 @@ await describe('I04 - CertificateSigned', async () => {
   })
 
   afterEach(() => {
+    standardCleanup()
     mock.restoreAll()
   })
   await describe('Valid Certificate Chain Installation', async () => {
index 54256f88c2443674ef47786ea937ad59f9b36fc1..df3c9a011ba5c657b0f2c9dc085d97f22e80f9c0 100644 (file)
@@ -13,11 +13,13 @@ import { OCPP20IncomingRequestService } from '../../../../src/charging-station/o
 import { OCPPAuthServiceFactory } from '../../../../src/charging-station/ocpp/auth/services/OCPPAuthServiceFactory.js'
 import { GenericStatus, OCPPVersion } from '../../../../src/types/index.js'
 import { Constants } from '../../../../src/utils/index.js'
+import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
 import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js'
 import { createMockChargingStation } from '../../ChargingStationTestUtils.js'
 
 await describe('C11 - Clear Authorization Data in Authorization Cache', async () => {
   afterEach(() => {
+    standardCleanup()
     mock.restoreAll()
   })
 
index b08c11cd5b8d265e57233e0ac9bdd81ed496a1a4..9a9f496e3ee08cf0c225a685f1e93a8e35e51aa6 100644 (file)
@@ -20,6 +20,7 @@ import {
   ReasonCodeEnumType,
 } from '../../../../src/types/index.js'
 import { Constants } from '../../../../src/utils/index.js'
+import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
 import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js'
 import { createMockChargingStation } from '../../ChargingStationTestUtils.js'
 import {
@@ -43,6 +44,7 @@ const NONEXISTENT_CERTIFICATE_HASH_DATA = {
 
 await describe('I04 - DeleteCertificate', async () => {
   afterEach(() => {
+    standardCleanup()
     mock.restoreAll()
   })
 
index 7a53ea5a649b5b452baa0a080e0d9e1d284aa226..98178b234c85bd26a0ebd004e854c38acf11eac4 100644 (file)
@@ -22,6 +22,7 @@ import {
   OCPPVersion,
 } from '../../../../src/types/index.js'
 import { Constants } from '../../../../src/utils/index.js'
+import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
 import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js'
 import { createMockChargingStation } from '../../ChargingStationTestUtils.js'
 import {
@@ -74,6 +75,7 @@ await describe('I04 - GetInstalledCertificateIds', async () => {
   })
 
   afterEach(() => {
+    standardCleanup()
     mock.restoreAll()
   })
 
index a364726aee7394649b957236aa964e6e77f03872..750d095fb3accfe46b930c411764e48886fab2a5 100644 (file)
@@ -19,6 +19,7 @@ import {
   OCPPVersion,
 } from '../../../../src/types/index.js'
 import { Constants } from '../../../../src/utils/index.js'
+import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
 import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js'
 import { createMockChargingStation } from '../../ChargingStationTestUtils.js'
 import {
@@ -53,6 +54,7 @@ SIb3DQEBCwUAA0EAexpired==
 
 await describe('I03 - InstallCertificate', async () => {
   afterEach(() => {
+    standardCleanup()
     mock.restoreAll()
   })
 
index 749406b99ca5975a179438e917479181340f91c6..456381c1ece3c22aec2df3db2e06b7617e65d62e 100644 (file)
@@ -17,6 +17,7 @@ import {
 } from '../../../../src/types/index.js'
 import { type ChargingStationType } from '../../../../src/types/ocpp/2.0/Common.js'
 import { Constants } from '../../../../src/utils/index.js'
+import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
 import {
   TEST_CHARGE_POINT_MODEL,
   TEST_CHARGE_POINT_SERIAL_NUMBER,
@@ -59,6 +60,7 @@ await describe('B01 - Cold Boot Charging Station', async () => {
   })
 
   afterEach(() => {
+    standardCleanup()
     mock.restoreAll()
   })
 
index 3bcf51928eb87408ebfc6fd702be434c1764a380..00b1c0e170d553552158f81841aa9348b20b1db7 100644 (file)
@@ -15,6 +15,7 @@ import {
   OCPPVersion,
 } from '../../../../src/types/index.js'
 import { Constants, has } from '../../../../src/utils/index.js'
+import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
 import {
   TEST_CHARGE_POINT_MODEL,
   TEST_CHARGE_POINT_SERIAL_NUMBER,
@@ -57,6 +58,7 @@ await describe('G02 - Heartbeat', async () => {
   })
 
   afterEach(() => {
+    standardCleanup()
     mock.restoreAll()
   })
 
index f4bad7ba065d456449c38b0f763b290c3d2e8aaf..00c3902654247a10c2625c921c01f906eb25ebbd 100644 (file)
@@ -23,6 +23,7 @@ import {
   ReasonCodeEnumType,
 } from '../../../../src/types/index.js'
 import { Constants } from '../../../../src/utils/index.js'
+import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
 import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js'
 import { createMockChargingStation } from '../../ChargingStationTestUtils.js'
 
@@ -60,6 +61,7 @@ await describe('M02 - Get15118EVCertificate Request', async () => {
   })
 
   afterEach(() => {
+    standardCleanup()
     mock.restoreAll()
   })
 
index bfb9e02c28c64a1dacb6a39bd55c287b2ead939e..bd50afd571ea617ae79183f4ac8aa2109d824234 100644 (file)
@@ -24,6 +24,7 @@ import {
   type ReportDataType,
 } from '../../../../src/types/index.js'
 import { Constants } from '../../../../src/utils/index.js'
+import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
 import {
   TEST_CHARGE_POINT_MODEL,
   TEST_CHARGE_POINT_SERIAL_NUMBER,
@@ -59,6 +60,7 @@ await describe('B07/B08 - NotifyReport', async () => {
   })
 
   afterEach(() => {
+    standardCleanup()
     mock.restoreAll()
   })
 
index 7ac34e19837740be52088d587e104ca3af7aeb35..6fd5192cb10c540c86b99ba74ca3fc7007059cc3 100644 (file)
@@ -18,6 +18,7 @@ import {
   OCPPVersion,
 } from '../../../../src/types/index.js'
 import { Constants } from '../../../../src/utils/index.js'
+import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
 import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js'
 import { createMockChargingStation } from '../../ChargingStationTestUtils.js'
 
@@ -46,6 +47,7 @@ await describe('I02 - SignCertificate Request', async () => {
   })
 
   afterEach(() => {
+    standardCleanup()
     mock.restoreAll()
   })
 
index 3b31c6caff9496224e666a322b3cbf0ef946d4a1..00c618242c5298547be320d615d2958c0287fb2f 100644 (file)
@@ -16,6 +16,7 @@ import {
   OCPPVersion,
 } from '../../../../src/types/index.js'
 import { Constants } from '../../../../src/utils/index.js'
+import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
 import {
   TEST_FIRMWARE_VERSION,
   TEST_STATUS_CHARGE_POINT_MODEL,
@@ -58,6 +59,7 @@ await describe('G01 - Status Notification', async () => {
   })
 
   afterEach(() => {
+    standardCleanup()
     mock.restoreAll()
   })
 
index 930c2b9dc09698f0611ba69d092089eef071eaad..94001aa9f445a782b26b8e728179fec1b69d763f 100644 (file)
@@ -64,7 +64,7 @@ function buildWsExampleUrl (targetLength: number, fillerChar = 'a'): string {
   return base + fillerChar.repeat(targetLength - base.length)
 }
 
-await describe('B05/B06 - OCPP20VariableManager test suite', async () => {
+await describe('B05 - OCPP20VariableManager', async () => {
   // Type declaration for mock ChargingStation
   let station: ChargingStation
 
index d76170d09eb4dd2db24b28e706475e85dda8b0e9..849995973af4068582490802338150bfc2d89e22 100644 (file)
@@ -15,6 +15,7 @@ import {
   IdentifierType,
 } from '../../../../src/charging-station/ocpp/auth/types/AuthTypes.js'
 import { OCPPVersion } from '../../../../src/types/ocpp/OCPPVersion.js'
+import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
 import { createMockChargingStation } from '../../ChargingStationTestUtils.js'
 import { createMockAuthRequest, createMockIdentifier } from './helpers/MockFactories.js'
 
@@ -49,6 +50,7 @@ await describe('OCPP Authentication Integration Tests', async () => {
   })
 
   afterEach(() => {
+    standardCleanup()
     mock.restoreAll()
   })
 
index 04b6a08fcbdd77b022ef71eb01f9e5e9b8c7137f..1b958188a756b3b53063c2e0669b7a71d41e2604 100644 (file)
@@ -18,6 +18,7 @@ import {
 } from '../../../../../src/charging-station/ocpp/auth/types/AuthTypes.js'
 import { OCPP16AuthorizationStatus } from '../../../../../src/types/ocpp/1.6/Transaction.js'
 import { OCPPVersion } from '../../../../../src/types/ocpp/OCPPVersion.js'
+import { standardCleanup } from '../../../../helpers/TestLifecycleHelpers.js'
 import { createMockAuthorizationResult, createMockIdentifier } from '../helpers/MockFactories.js'
 
 await describe('OCPP16AuthAdapter', async () => {
@@ -55,6 +56,7 @@ await describe('OCPP16AuthAdapter', async () => {
 
   afterEach(() => {
     mock.restoreAll()
+    standardCleanup()
   })
 
   await describe('constructor', async () => {
index 4cd34754e63bdd7fede0e538558065cb52f948f6..0dfb917dbe8500edc32f74217a438b2277f8eace 100644 (file)
@@ -22,6 +22,7 @@ import {
   RequestStartStopStatusEnumType,
 } from '../../../../../src/types/ocpp/2.0/Transaction.js'
 import { OCPPVersion } from '../../../../../src/types/ocpp/OCPPVersion.js'
+import { standardCleanup } from '../../../../helpers/TestLifecycleHelpers.js'
 import { createMockAuthorizationResult, createMockIdentifier } from '../helpers/MockFactories.js'
 
 await describe('OCPP20AuthAdapter', async () => {
@@ -42,6 +43,7 @@ await describe('OCPP20AuthAdapter', async () => {
 
   afterEach(() => {
     mock.restoreAll()
+    standardCleanup()
   })
 
   await describe('constructor', async () => {
index f6a2cf7ecf082bce0238fe6da24ca75cd78e1166..470b952a75f1422776f86ec1bf8a2ce9f832ab01 100644 (file)
@@ -12,6 +12,7 @@ import {
   AuthenticationMethod,
   AuthorizationStatus,
 } from '../../../../../src/charging-station/ocpp/auth/types/AuthTypes.js'
+import { standardCleanup } from '../../../../helpers/TestLifecycleHelpers.js'
 import { createMockAuthorizationResult } from '../helpers/MockFactories.js'
 
 /**
@@ -41,6 +42,7 @@ await describe('InMemoryAuthCache - G03.FR.01 Conformance', async () => {
   })
 
   afterEach(() => {
+    standardCleanup()
     mock.restoreAll()
   })
 
index 195ebf8bdf63140109416902cd071a8b44f8b26f..38562548c69afdac8fa47ab558299ba492118a86 100644 (file)
@@ -15,6 +15,7 @@ import {
   IdentifierType,
 } from '../../../../../src/charging-station/ocpp/auth/types/AuthTypes.js'
 import { OCPPVersion } from '../../../../../src/types/ocpp/OCPPVersion.js'
+import { standardCleanup } from '../../../../helpers/TestLifecycleHelpers.js'
 import {
   createMockAuthorizationResult,
   createMockAuthRequest,
@@ -58,6 +59,7 @@ await describe('CertificateAuthStrategy', async () => {
 
   afterEach(() => {
     mock.restoreAll()
+    standardCleanup()
   })
 
   await describe('constructor', async () => {
index 5978dd940153204d1528df2b8abd4377b4f0e6d4..f34eb837057c65b1ec9a9ac98d43b602860dc29c 100644 (file)
@@ -18,6 +18,7 @@ import {
   IdentifierType,
 } from '../../../../../src/charging-station/ocpp/auth/types/AuthTypes.js'
 import { OCPPVersion } from '../../../../../src/types/ocpp/OCPPVersion.js'
+import { standardCleanup } from '../../../../helpers/TestLifecycleHelpers.js'
 import {
   createMockAuthCache,
   createMockAuthorizationResult,
@@ -40,6 +41,7 @@ await describe('LocalAuthStrategy', async () => {
 
   afterEach(() => {
     mock.restoreAll()
+    standardCleanup()
   })
 
   await describe('constructor', async () => {
index 973b46a103110d588f11387b0034e6006d1e9378..3727f3b454d08ae5f25d9699f499ca3afa8c2b70 100644 (file)
@@ -17,6 +17,7 @@ import {
   IdentifierType,
 } from '../../../../../src/charging-station/ocpp/auth/types/AuthTypes.js'
 import { OCPPVersion } from '../../../../../src/types/ocpp/OCPPVersion.js'
+import { standardCleanup } from '../../../../helpers/TestLifecycleHelpers.js'
 import {
   createMockAuthCache,
   createMockAuthRequest,
@@ -45,6 +46,7 @@ await describe('RemoteAuthStrategy', async () => {
 
   afterEach(() => {
     mock.restoreAll()
+    standardCleanup()
   })
 
   await describe('constructor', async () => {
index 0f84170c365d1567fc3067d116ed21e34b7a8c8a..7d993f61f79fd42cc851eeaa571826f6935e3cf8 100644 (file)
@@ -29,9 +29,11 @@ import {
   RequestStartStopStatusEnumType,
 } from '../../../../../src/types/ocpp/2.0/Transaction.js'
 import { OCPPVersion } from '../../../../../src/types/ocpp/OCPPVersion.js'
+import { standardCleanup } from '../../../../helpers/TestLifecycleHelpers.js'
 
 await describe('AuthTypes', async () => {
   afterEach(() => {
+    standardCleanup()
     mock.restoreAll()
   })
   await describe('IdentifierTypeGuards', async () => {
index db13cf29c3be75294b56bec7cb80231bc6262818..c2a7f031739d6055d6ef1691755ca70602aaa33a 100644 (file)
@@ -15,9 +15,11 @@ import {
 } from '../../../../../src/charging-station/ocpp/auth/types/AuthTypes.js'
 import { AuthHelpers } from '../../../../../src/charging-station/ocpp/auth/utils/AuthHelpers.js'
 import { OCPPVersion } from '../../../../../src/types/ocpp/OCPPVersion.js'
+import { standardCleanup } from '../../../../helpers/TestLifecycleHelpers.js'
 
 await describe('AuthHelpers', async () => {
   afterEach(() => {
+    standardCleanup()
     mock.restoreAll()
   })
   await describe('calculateTTL', async () => {
index 5060b8f29a520c1cb0427621558e25a65416e171..ac6b6c40a7dc818eeadd5d5eb5f4e25c014b4566 100644 (file)
@@ -13,9 +13,11 @@ import {
 } from '../../../../../src/charging-station/ocpp/auth/types/AuthTypes.js'
 import { AuthValidators } from '../../../../../src/charging-station/ocpp/auth/utils/AuthValidators.js'
 import { OCPPVersion } from '../../../../../src/types/ocpp/OCPPVersion.js'
+import { standardCleanup } from '../../../../helpers/TestLifecycleHelpers.js'
 
 await describe('AuthValidators', async () => {
   afterEach(() => {
+    standardCleanup()
     mock.restoreAll()
   })
   await describe('isValidCacheTTL', async () => {
index a9c7b3cebe6beef87b1676ee550b29a9c3141191..d1a4c7396ed67c99ddddcab004d1f242b92b6e93 100644 (file)
@@ -13,9 +13,11 @@ import {
   AuthorizationStatus,
 } from '../../../../../src/charging-station/ocpp/auth/types/AuthTypes.js'
 import { AuthConfigValidator } from '../../../../../src/charging-station/ocpp/auth/utils/ConfigValidator.js'
+import { standardCleanup } from '../../../../helpers/TestLifecycleHelpers.js'
 
 await describe('AuthConfigValidator', async () => {
   afterEach(() => {
+    standardCleanup()
     mock.restoreAll()
   })
   await describe('validate', async () => {
index 092076890d12c67e4101bb867358c42f799d8bbb..9e81b9e27934e19e8e0986906ea60e9da4f452a5 100644 (file)
@@ -13,6 +13,7 @@ import type { UUIDv4 } from '../../../src/types/index.js'
 import { UIHttpServer } from '../../../src/charging-station/ui-server/UIHttpServer.js'
 import { DEFAULT_COMPRESSION_THRESHOLD } from '../../../src/charging-station/ui-server/UIServerSecurity.js'
 import { ApplicationProtocol, ResponseStatus } from '../../../src/types/index.js'
+import { standardCleanup } from '../../helpers/TestLifecycleHelpers.js'
 import { GZIP_STREAM_FLUSH_DELAY_MS, TEST_UUID } from './UIServerTestConstants.js'
 import {
   createMockUIServerConfiguration,
@@ -46,9 +47,10 @@ const createLargePayload = (status: ResponseStatus = ResponseStatus.SUCCESS) =>
   status,
 })
 
-await describe('UIHttpServer test suite', async () => {
+await describe('UIHttpServer', async () => {
   afterEach(() => {
     mock.restoreAll()
+    standardCleanup()
   })
   await it('should delete response handler after successful send', () => {
     const server = new TestableUIHttpServer(createHttpServerConfig())
index 5312bd94dc8773c596199ad501e4bb656a422956..ba1a062ebe548d9fd8210223694e0bd4d4e5c171 100644 (file)
@@ -14,13 +14,15 @@ import {
   isValidCredential,
   isValidNumberOfStations,
 } from '../../../src/charging-station/ui-server/UIServerSecurity.js'
+import { standardCleanup } from '../../helpers/TestLifecycleHelpers.js'
 import { waitForStreamFlush } from './UIServerTestUtils.js'
 
 const RATE_WINDOW_EXPIRY_DELAY_MS = 110
 
-await describe('UIServerSecurity test suite', async () => {
+await describe('UIServerSecurity', async () => {
   afterEach(() => {
     mock.restoreAll()
+    standardCleanup()
   })
   await describe('isValidCredential()', async () => {
     await it('should return true for matching credentials', () => {
index a0afa68d3c3139919c6dde68ae560ab828431baf..216237aaa528609622e8260094813729a0c1e924 100644 (file)
@@ -10,6 +10,7 @@ import { afterEach, describe, it, mock } from 'node:test'
 import type { UUIDv4 } from '../../../src/types/index.js'
 
 import { ProcedureName, ResponseStatus } from '../../../src/types/index.js'
+import { standardCleanup } from '../../helpers/TestLifecycleHelpers.js'
 import { TEST_UUID } from './UIServerTestConstants.js'
 import {
   createMockUIServerConfiguration,
@@ -19,9 +20,10 @@ import {
   TestableUIWebSocketServer,
 } from './UIServerTestUtils.js'
 
-await describe('UIWebSocketServer test suite', async () => {
+await describe('UIWebSocketServer', async () => {
   afterEach(() => {
     mock.restoreAll()
+    standardCleanup()
   })
   await it('should delete response handler after successful send', () => {
     const config = createMockUIServerConfiguration()
index 5531054b0ec4500aaaeb6525fe0f9f5750ee8d25..15593330f47f65e31f7b015feb936de23b6f7f5f 100644 (file)
@@ -8,6 +8,7 @@ import { expect } from '@std/expect'
 import { afterEach, describe, it, mock } from 'node:test'
 
 import { ProcedureName, ProtocolVersion, ResponseStatus } from '../../../../src/types/index.js'
+import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
 import { TEST_HASH_ID, TEST_UUID } from '../UIServerTestConstants.js'
 import {
   createMockChargingStationData,
@@ -16,9 +17,10 @@ import {
   TestableUIWebSocketServer,
 } from '../UIServerTestUtils.js'
 
-await describe('AbstractUIService test suite', async () => {
+await describe('AbstractUIService', async () => {
   afterEach(() => {
     mock.restoreAll()
+    standardCleanup()
   })
   await it('should check response handler existence before sending', () => {
     const config = createMockUIServerConfiguration()
index a715a7ddf6b75a3bb164bea3d048beec187e7aae..a4271d14c5588687664640d07060755d967ae193 100644 (file)
@@ -6,9 +6,11 @@ import { expect } from '@std/expect'
 import { afterEach, describe, it, mock } from 'node:test'
 
 import { BaseError } from '../../src/exception/BaseError.js'
+import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
 
-await describe('BaseError test suite', async () => {
+await describe('BaseError', async () => {
   afterEach(() => {
+    standardCleanup()
     mock.restoreAll()
   })
   await it('should create instance with default values', () => {
index 4a5ff48789030a24f674ff9960265e5908c6ed16..a1bb50f288655838c56b6e8d2d6452d3fd775e51 100644 (file)
@@ -8,9 +8,11 @@ import { afterEach, describe, it, mock } from 'node:test'
 import { OCPPError } from '../../src/exception/OCPPError.js'
 import { ErrorType } from '../../src/types/index.js'
 import { Constants } from '../../src/utils/Constants.js'
+import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
 
-await describe('OCPPError test suite', async () => {
+await describe('OCPPError', async () => {
   afterEach(() => {
+    standardCleanup()
     mock.restoreAll()
   })
 
index 979d707c33bbb0417f8da6f92d8180512752607e..a12b970fdde5bd0660ca6955f14ae1f26f8bea6e 100644 (file)
@@ -10,9 +10,11 @@ import {
   ConfigurationSection,
   SupervisionUrlDistribution,
 } from '../../src/types/ConfigurationData.js'
+import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
 
-await describe('ConfigurationData test suite', async () => {
+await describe('ConfigurationData', async () => {
   afterEach(() => {
+    standardCleanup()
     mock.restoreAll()
   })
 
index 0d8125776c2accad874d80407107227f6b2605d4..943216c5bb6b3e9e3e21ffbe573aff1f424e5e7b 100644 (file)
@@ -7,9 +7,11 @@ import { randomInt } from 'node:crypto'
 import { afterEach, describe, it, mock } from 'node:test'
 
 import { AsyncLock, AsyncLockType } from '../../src/utils/AsyncLock.js'
+import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
 
-await describe('AsyncLock test suite', async () => {
+await describe('AsyncLock', async () => {
   afterEach(() => {
+    standardCleanup()
     mock.restoreAll()
   })
   await it('should run synchronous functions exclusively in sequence', () => {
index 57529008f4d7839acb3d1c7fe80fb19519a0ae36..61d193144311e68acaca6c143ca3c209d24d5c54 100644 (file)
@@ -15,7 +15,7 @@ import {
 } from '../../src/utils/ConfigurationUtils.js'
 import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
 
-await describe('ConfigurationUtils test suite', async () => {
+await describe('ConfigurationUtils', async () => {
   afterEach(() => {
     standardCleanup()
   })
index 119402228e5701134cfde0631ed0e572ad497bcd..251206a5d670b7774d05c4f4581e653c2c3ef920 100644 (file)
@@ -6,9 +6,11 @@ import { expect } from '@std/expect'
 import { afterEach, describe, it, mock } from 'node:test'
 
 import { ACElectricUtils, DCElectricUtils } from '../../src/utils/ElectricUtils.js'
+import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
 
-await describe('ElectricUtils test suite', async () => {
+await describe('ElectricUtils', async () => {
   afterEach(() => {
+    standardCleanup()
     mock.restoreAll()
   })
   await it('should calculate DC power from voltage and current', () => {
index cb4d6e62c83a2d41970ae3bc99c77b82b4f3694e..c508107b5285bccb28865f448ceb5b2a90e07920 100644 (file)
@@ -21,7 +21,7 @@ import { logger } from '../../src/utils/Logger.js'
 import { createMockChargingStation } from '../charging-station/ChargingStationTestUtils.js'
 import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
 
-await describe('ErrorUtils test suite', async () => {
+await describe('ErrorUtils', async () => {
   const { station: chargingStation } = createMockChargingStation({ baseName: 'CS-TEST' })
 
   afterEach(() => {
index 1b231a447e7df14b69a2df5e3c5b883e089e7752..05bd6cc47f207c08fb23eae3c2a46433c21d8404 100644 (file)
@@ -6,9 +6,11 @@ import { expect } from '@std/expect'
 import { afterEach, describe, it, mock } from 'node:test'
 
 import { average, max, median, min, percentile, std } from '../../src/utils/StatisticUtils.js'
+import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
 
-await describe('StatisticUtils test suite', async () => {
+await describe('StatisticUtils', async () => {
   afterEach(() => {
+    standardCleanup()
     mock.restoreAll()
   })
   await it('should calculate arithmetic mean of array values', () => {
index 9f1c538c6b0a267dd06de8356023357d6921c9ab..57d5109a0e8b7b71c0a74e5b66af4de1ff975f88 100644 (file)
@@ -45,7 +45,7 @@ import {
 } from '../../src/utils/Utils.js'
 import { standardCleanup, withMockTimers } from '../helpers/TestLifecycleHelpers.js'
 
-await describe('Utils test suite', async () => {
+await describe('Utils', async () => {
   afterEach(() => {
     standardCleanup()
   })
index a80f256f7525647cead7fc62f6be7c8af9c7233b..942dc34ce39dcecc1aeab88a5eca545b62819eb3 100644 (file)
@@ -15,7 +15,7 @@ import {
 } from '../../src/worker/WorkerUtils.js'
 import { standardCleanup, withMockTimers } from '../helpers/TestLifecycleHelpers.js'
 
-await describe('WorkerUtils test suite', async () => {
+await describe('WorkerUtils', async () => {
   afterEach(() => {
     standardCleanup()
   })