From: Jérôme Benoit Date: Wed, 17 Jun 2026 17:22:45 +0000 (+0200) Subject: style(test): fix lint warnings in OCPP 2.0 ForceTxOnInvalid test X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=bda42eb05c5a234441c6b154ecc970b52e86410c;p=e-mobility-charging-stations-simulator.git style(test): fix lint warnings in OCPP 2.0 ForceTxOnInvalid test 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). --- diff --git a/tests/charging-station/ocpp/2.0/OCPP20ResponseService-ForceTxOnInvalid.test.ts b/tests/charging-station/ocpp/2.0/OCPP20ResponseService-ForceTxOnInvalid.test.ts index f65c35e2..b3443ecc 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20ResponseService-ForceTxOnInvalid.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20ResponseService-ForceTxOnInvalid.test.ts @@ -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).