]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commitdiff
refactor(test): remove implementation history from comments
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 1 Mar 2026 01:41:36 +0000 (02:41 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 1 Mar 2026 01:41:36 +0000 (02:41 +0100)
Comments should describe what the code does, not how it evolved.

tests/charging-station/ocpp/auth/helpers/MockFactories.ts
tests/charging-station/ui-server/UIServerSecurity.test.ts
tests/charging-station/ui-server/UIServerTestUtils.ts
tests/charging-station/ui-server/UIWebSocketServer.test.ts

index d697765315f60965dbbdca3da0bf0305708c0bea..88684d14bda4e4a3500ce6290768a364f731485f 100644 (file)
@@ -61,12 +61,7 @@ export const createMockAuthRequest = (overrides?: Partial<AuthRequest>): AuthReq
 /**
  * Create a mock AuthorizationResult with configurable status.
  *
- * This factory consolidates what were previously 5 separate factories:
- * - createMockAuthorizationResult (ACCEPTED)
- * - createMockRejectedAuthorizationResult (INVALID)
- * - createMockBlockedAuthorizationResult (BLOCKED)
- * - createMockExpiredAuthorizationResult (EXPIRED)
- * - createMockConcurrentTxAuthorizationResult (CONCURRENT_TX)
+ * Supports all AuthorizationStatus values: ACCEPTED, INVALID, BLOCKED, EXPIRED, CONCURRENT_TX.
  * @param status - Authorization status (defaults to ACCEPTED)
  * @param overrides - Partial AuthorizationResult properties to override defaults
  * @returns Mock AuthorizationResult with specified status from local list method
index e2db4beee7f38778eb75c9ed4199441181669389..8d858c452d45d950198f8f1de2dd2e0cdd3124d0 100644 (file)
@@ -2,7 +2,6 @@
  * @file Tests for UIServerSecurity
  * @description Unit tests for UI server security utilities (rate limiting, validation)
  */
-// Copyright Jerome Benoit. 2024-2025. All Rights Reserved.
 
 import { expect } from '@std/expect'
 import { afterEach, describe, it } from 'node:test'
index c726025b17e98b532b3457deed24e1e429899524..8121ad65e611d9ce5ca7be54af34820d499aba82 100644 (file)
@@ -26,7 +26,6 @@ import { MockWebSocket } from '../mocks/MockWebSocket.js'
 
 /**
  * Testable UIWebSocketServer that exposes protected members for testing.
- * Consolidates TestableUIWebSocketServer from UIWebSocketServer.test.ts and AbstractUIService.test.ts.
  */
 export class TestableUIWebSocketServer extends UIWebSocketServer {
   /**
@@ -243,8 +242,8 @@ export interface MockUIService {
 /**
  * Create a mock UI service for testing UIWebSocketServer.
  *
- * Consolidates MockUIServiceBroadcast, MockUIServiceError, and MockUIServiceNonBroadcast
- * into a single parameterized factory.
+ * Configurable mock that simulates different AbstractUIService behaviors:
+ * broadcast responses, error responses, or direct (non-broadcast) responses.
  * @param mode - Service behavior mode (defaults to BROADCAST)
  * @returns Mock UI service with behavior based on mode
  * @example
index 950cd10564f466d4543ce18dbd87d79fad9706aa..092051382d8f395d419efa0a6482dc1e54da445c 100644 (file)
@@ -2,7 +2,6 @@
  * @file Tests for UIWebSocketServer
  * @description Unit tests for WebSocket-based UI server and response handling
  */
-// Copyright Jerome Benoit. 2024-2025. All Rights Reserved.
 
 import { expect } from '@std/expect'
 import { afterEach, describe, it } from 'node:test'