AuthenticationMethod,
AuthorizationStatus,
} from '../../../../../src/charging-station/ocpp/auth/types/AuthTypes.js'
-import { truncateId } from '../../../../../src/utils/index.js'
import { standardCleanup, withMockTimers } from '../../../../helpers/TestLifecycleHelpers.js'
import { createMockAuthorizationResult } from '../helpers/MockFactories.js'
})
})
- await describe('Helper - truncateId', async () => {
- await it('should return identifier unchanged when short', () => {
- const result = truncateId('ABCD')
- assert.strictEqual(result, 'ABCD')
- })
-
- await it('should truncate long identifier with ellipsis', () => {
- const result = truncateId('ABCDEFGHIJKLMNOP')
- assert.strictEqual(result, 'ABCDEFGH...')
- })
- })
-
await describe('G03.FR.01.T10 - Periodic Cleanup and Rate Limit Bounds (R8, R9)', async () => {
await it('G03.FR.01.T10.01 - dispose() stops the cleanup interval and is safe to call twice', () => {
const cleanupCache = new InMemoryAuthCache({
roundTo,
secureRandom,
sleep,
+ truncateId,
validateIdentifierString,
validateUUID,
} from '../../src/utils/Utils.js'
callback()
}, error)
})
+
+ await describe('truncateId', async () => {
+ await it('should return identifier unchanged when short', () => {
+ const result = truncateId('ABCD')
+ assert.strictEqual(result, 'ABCD')
+ })
+
+ await it('should truncate long identifier with ellipsis', () => {
+ const result = truncateId('ABCDEFGHIJKLMNOP')
+ assert.strictEqual(result, 'ABCDEFGH...')
+ })
+ })
})