]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commitdiff
refactor: spell fixes
authorJérôme Benoit <jerome.benoit@sap.com>
Tue, 18 Nov 2025 16:17:18 +0000 (17:17 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Tue, 18 Nov 2025 16:17:18 +0000 (17:17 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ocpp/auth/index.ts
src/charging-station/ocpp/auth/types/AuthTypes.ts
tests/charging-station/ocpp/auth/types/AuthTypes.test.ts

index 2be89d17d959905f6b7801500a20d0e763930059..bd323c8af0b00cb9a8693135f9bae5f98e2e7df1 100644 (file)
@@ -72,8 +72,8 @@ export {
 } from './types/AuthTypes.js'
 export {
   isCertificateBased,
-  isOCCP16Type,
-  isOCCP20Type,
+  isOCPP16Type,
+  isOCPP20Type,
   mapOCPP16Status,
   mapOCPP20TokenType,
   mapToOCPP16Status,
index 3fccdd3ff1f2807ccd5d3c9a02f6733155892532..641b2fb7ff28f41f4609b8cb9382ac586389c09e 100644 (file)
@@ -300,20 +300,20 @@ export const isCertificateBased = (type: IdentifierType): boolean => {
 }
 
 /**
- * Check if identifier type is OCCP 1.6 compatible
+ * Check if identifier type is OCPP 1.6 compatible
  * @param type - Identifier type to check
  * @returns True if OCPP 1.6 type
  */
-export const isOCCP16Type = (type: IdentifierType): boolean => {
+export const isOCPP16Type = (type: IdentifierType): boolean => {
   return type === IdentifierType.ID_TAG
 }
 
 /**
- * Check if identifier type is OCCP 2.0 compatible
+ * Check if identifier type is OCPP 2.0 compatible
  * @param type - Identifier type to check
  * @returns True if OCPP 2.0 type
  */
-export const isOCCP20Type = (type: IdentifierType): boolean => {
+export const isOCPP20Type = (type: IdentifierType): boolean => {
   return Object.values(OCPP20IdTokenEnumType).includes(type as unknown as OCPP20IdTokenEnumType)
 }
 
index 32b170c5302bbecb5a248cac3e9b295d755a1efe..7a25990a0b0ea94af642e10e4902b4faf5be600f 100644 (file)
@@ -9,8 +9,8 @@ import {
   AuthorizationStatus,
   IdentifierType,
   isCertificateBased,
-  isOCCP16Type,
-  isOCCP20Type,
+  isOCPP16Type,
+  isOCPP20Type,
   mapOCPP16Status,
   mapOCPP20TokenType,
   mapToOCPP16Status,
@@ -29,16 +29,16 @@ import { OCPPVersion } from '../../../../../src/types/ocpp/OCPPVersion.js'
 await describe('AuthTypes', async () => {
   await describe('IdentifierTypeGuards', async () => {
     await it('should correctly identify OCPP 1.6 types', () => {
-      expect(isOCCP16Type(IdentifierType.ID_TAG)).toBe(true)
-      expect(isOCCP16Type(IdentifierType.CENTRAL)).toBe(false)
-      expect(isOCCP16Type(IdentifierType.LOCAL)).toBe(false)
+      expect(isOCPP16Type(IdentifierType.ID_TAG)).toBe(true)
+      expect(isOCPP16Type(IdentifierType.CENTRAL)).toBe(false)
+      expect(isOCPP16Type(IdentifierType.LOCAL)).toBe(false)
     })
 
     await it('should correctly identify OCPP 2.0 types', () => {
-      expect(isOCCP20Type(IdentifierType.CENTRAL)).toBe(true)
-      expect(isOCCP20Type(IdentifierType.LOCAL)).toBe(true)
-      expect(isOCCP20Type(IdentifierType.E_MAID)).toBe(true)
-      expect(isOCCP20Type(IdentifierType.ID_TAG)).toBe(false)
+      expect(isOCPP20Type(IdentifierType.CENTRAL)).toBe(true)
+      expect(isOCPP20Type(IdentifierType.LOCAL)).toBe(true)
+      expect(isOCPP20Type(IdentifierType.E_MAID)).toBe(true)
+      expect(isOCPP20Type(IdentifierType.ID_TAG)).toBe(false)
     })
 
     await it('should correctly identify certificate-based types', () => {