]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commitdiff
style(test): fix lint warnings in OCPP 2.0 ForceTxOnInvalid test
authorJérôme Benoit <jerome.benoit@sap.com>
Wed, 17 Jun 2026 17:22:45 +0000 (19:22 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Wed, 17 Jun 2026 17:22:45 +0000 (19:22 +0200)
Three pre-existing post-merge warnings introduced by the squash-merge
of #1907 on the file:
`tests/charging-station/ocpp/2.0/OCPP20ResponseService-ForceTxOnInvalid.test.ts`

- Lines 67-68: `jsdoc/require-param-description` — fill the empty
  `@param idToken.idToken` and `@param idToken.type` sub-property
  descriptions auto-inserted by eslint-plugin-jsdoc.
- Line 298: `@cspell/spellchecker` — replace "remock" with "re-mock"
  (English-correct hyphenation, matches existing repo idioms like
  "re-entrant", "re-export").

Verification: pnpm lint exit 0 with 0 errors / 0 warnings; focused
`pnpm test` on the file: 16/16 GREEN (substring assertions unaffected).

tests/charging-station/ocpp/2.0/OCPP20ResponseService-ForceTxOnInvalid.test.ts

index f65c35e26d3b586241dc498b46d5778a2dbfc798..b3443ecc3c2d02012b14d2f32aba9d890b01a0c4 100644 (file)
@@ -64,8 +64,8 @@ interface TestableOCPP20ResponseService {
  * @param eventType - The TransactionEvent type (Started/Updated/Ended)
  * @param idToken - Optional idToken to attach; required to exercise the auth-cache
  *   update path at OCPP20ResponseService.ts (C10.FR.01/04/05)
- * @param idToken.idToken
- * @param idToken.type
+ * @param idToken.idToken - OCPP IdToken value (e.g. an RFID tag string)
+ * @param idToken.type - OCPP 2.0.1 IdToken type (e.g. `ISO14443`, `ISO15693`, `Central`)
  * @returns A minimal OCPP20TransactionEventRequest
  */
 function buildTransactionEventRequest (
@@ -295,7 +295,7 @@ await describe('OCPP20ResponseService — forceTransactionOnInvalidIdToken (issu
 
   // 2.0-T6 — `idTokenInfo == null` is treated as Accepted under both flag values.
   // Split into two `it()` blocks (flag-on / flag-off) so each runs against a
-  // freshly-mocked station; avoids the mid-test cleanup+remock pattern.
+  // freshly-mocked station; avoids the mid-test cleanup+re-mock pattern.
   // Both branches additionally assert that the override-marker warn-log is
   // NOT emitted on null payload (locks the invariant against the A6 regression
   // where someone "fixes" the override-marker `else if` to also fire on null).