]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
chore: harmonize test filenames to PascalCase concern suffix convention (#1955)
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 5 Jul 2026 21:30:16 +0000 (23:30 +0200)
committerGitHub <noreply@github.com>
Sun, 5 Jul 2026 21:30:16 +0000 (23:30 +0200)
commitf7640876ebe2863aeaaaa1fbfdc22549d6ed485a
treef2e278990cd863adb68614763d6929006d3b384f
parentdaad8a9d812aa4484ebdb5e50d0ec09daa6fbf3c
chore: harmonize test filenames to PascalCase concern suffix convention (#1955)

chore: harmonize test filenames to PascalCase concern suffix convention

Rename 9 test files whose naming violated the codebase's dominant
`<Source>[-<PascalConcern>].test.ts` convention. 156/165 test files were
already conformant; this PR closes the remaining gap.

Renames (all via `git mv`, content unchanged):

Casing/separator normalizations (7):
- tests/utils/Configuration-hot-reload.test.ts
  → tests/utils/Configuration-HotReload.test.ts (kebab-case lowercase)
- tests/utils/ConfigurationValidation-perf.test.ts
  → tests/utils/ConfigurationValidation-Perf.test.ts (lowercase)
- tests/charging-station/ocpp/OCPPServiceUtils-pure.test.ts
  → tests/charging-station/ocpp/OCPPServiceUtils-Pure.test.ts (lowercase)
- tests/charging-station/ocpp/OCPPServiceUtils-meterValues.test.ts
  → tests/charging-station/ocpp/OCPPServiceUtils-MeterValues.test.ts (camelCase)
- tests/charging-station/ocpp/OCPPServiceUtils-validation.test.ts
  → tests/charging-station/ocpp/OCPPServiceUtils-Validation.test.ts (lowercase)
- tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-enforceMessageLimits.test.ts
  → tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-EnforceMessageLimits.test.ts
  (camelCase)
- tests/charging-station/ui-server/UIMCPServer.integration.test.ts
  → tests/charging-station/ui-server/UIMCPServer-Integration.test.ts
  (`.integration.` — sole `.` separator in the test tree; now aligned on
  the `-Integration` pattern used by 5 sibling integration tests)

Aggregate-pattern alignment (1):
- tests/charging-station/ocpp/1.6/OCPP16-CoherentMeterValues.test.ts
  → tests/charging-station/ocpp/1.6/OCPP16Integration-CoherentMeterValues.test.ts
  Sole use of `OCPP16-<Concept>` (version-dash without Integration) in
  the entire test tree. The file's own `@file` header describes itself
  as an "Integration-style test", aligning it with the established
  `OCPP16Integration-<PascalConcern>` aggregate pattern used by 4
  siblings (`-ChargingProfiles`, `-Configuration`, `-Reservations`,
  `-Transactions`).

OCPP standard casing (1):
- tests/charging-station/ocpp/2.0/OCPP20RequestService-HeartBeat.test.ts
  → tests/charging-station/ocpp/2.0/OCPP20RequestService-Heartbeat.test.ts
  Every other file in the 12-file `OCPP20RequestService-*` group uses
  the OCPP standard action spelling (`BootNotification`, `MeterValues`,
  `NotifyReport`, etc.). OCPP 2.0.1 spells the action `Heartbeat` (single
  word); the `HeartBeat` variant with a mid-word capital B was the sole
  outlier.

Not renamed (accepted as legitimate cases):
- OCPPAuthIntegration.test.ts — "Integration" fused into the concept
  name, no per-concern split.
- OCPP20Integration.test.ts — aggregate test with no per-concern split.
- CoherentMeterValues.test.ts (meter-values/) — PascalCase concept name
  for a multi-file subsystem, no casing violation.
- StrategyDispatch.test.ts, UIMetricsEndpoint.test.ts — PascalCase
  concept/aggregate names, no casing violation.

Content preserved verbatim in 8 of the 9 renamed files (case-only and
separator renames via `git mv` two-step for macOS APFS
case-insensitivity). The 9th file (`OCPP20RequestService-Heartbeat.test.ts`)
had 8 internal `HeartBeat` references (JSDoc `@file`, 5 `it()` descriptions,
2 inline comments) updated to `Heartbeat` to match the OCPP 2.0.1 spec
spelling — the same rationale that motivated the filename rename. Source
code already uses `Heartbeat` consistently (`src/types/ocpp/2.0/Requests.ts:
HEARTBEAT = 'Heartbeat'`).

No consumer updates required: the only non-test references to the old
filenames live in auto-regenerated caches (`.serena/cache`,
`.hermes/evidence`, `.eslintcache`) which self-heal, and historical
planning docs under `.omo/plans/` (frozen; not updated).

Post-PR: 165/165 test files conformant to the codebase's dominant
`<Source>[-<PascalConcern>].test.ts` / `<Concept>Integration[-<PascalConcern>].test.ts`
conventions.

Quality gates: typecheck clean; the 9 renamed test files run
80/80 pass, 0 fail.

Out of scope for this PR (documented for future work):
- ui/web/tests/ has 7 outliers (Utils/Dialogs/Actions casing mismatch vs
  source dirs; Errors casing vs source file; SimpleComponents /
  ClassicComponents / SkinComponents aggregate names with no matching
  source entity). These live in a different workspace with its own
  convention (source-mirror casing per file role); a dedicated
  ui/web-scoped harmonization PR is warranted.
- Helper file placement inconsistency (some in `helpers/`, some
  co-located with `.test.ts` files) and 5 competing suffixes
  (TestUtils/TestHelpers/TestConstants/TestData/Fixtures) — needs a
  documented convention in TEST_STYLE_GUIDE before rename PR.
- `mocks/` vs `auth/helpers/` split for mocks (MockCaches/MockWebSocket
  in mocks/, MockFactories in auth/helpers/) — same follow-up.
tests/charging-station/ocpp/1.6/OCPP16Integration-CoherentMeterValues.test.ts [moved from tests/charging-station/ocpp/1.6/OCPP16-CoherentMeterValues.test.ts with 100% similarity]
tests/charging-station/ocpp/2.0/OCPP20RequestService-Heartbeat.test.ts [moved from tests/charging-station/ocpp/2.0/OCPP20RequestService-HeartBeat.test.ts with 91% similarity]
tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-EnforceMessageLimits.test.ts [moved from tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-enforceMessageLimits.test.ts with 100% similarity]
tests/charging-station/ocpp/OCPPServiceUtils-MeterValues.test.ts [moved from tests/charging-station/ocpp/OCPPServiceUtils-meterValues.test.ts with 100% similarity]
tests/charging-station/ocpp/OCPPServiceUtils-Pure.test.ts [moved from tests/charging-station/ocpp/OCPPServiceUtils-pure.test.ts with 100% similarity]
tests/charging-station/ocpp/OCPPServiceUtils-Validation.test.ts [moved from tests/charging-station/ocpp/OCPPServiceUtils-validation.test.ts with 100% similarity]
tests/charging-station/ui-server/UIMCPServer-Integration.test.ts [moved from tests/charging-station/ui-server/UIMCPServer.integration.test.ts with 100% similarity]
tests/utils/Configuration-HotReload.test.ts [moved from tests/utils/Configuration-hot-reload.test.ts with 100% similarity]
tests/utils/ConfigurationValidation-Perf.test.ts [moved from tests/utils/ConfigurationValidation-perf.test.ts with 100% similarity]