]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
fix(test-type-safety): remove unsafe type casts and add factory helper
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 28 Feb 2026 16:08:14 +0000 (17:08 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 28 Feb 2026 16:08:14 +0000 (17:08 +0100)
commit3d2431e2f36acc4768d14b7faccdf724fcd048a6
tree23d9bf3a571f20074f058671bdc82803bb50c03c
parentdfd8714dd97dec17425cc76e44e5b12e1d013035
fix(test-type-safety): remove unsafe type casts and add factory helper

Phase 1 (Type Safety):
- Remove 16 'undefined as unknown as' casts from 8 auth test files
- Add createStationWithCertificateManager() helper to OCPP20TestUtils
- Migrate 3 certificate test files to use the new type-safe helper

Phase 2 (Enhancements):
- Add explanatory comments to 9 ESLint override directives
- Update TEST_STYLE_GUIDE.md with new factory documentation
15 files changed:
tests/TEST_STYLE_GUIDE.md
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-DeleteCertificate.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetInstalledCertificateIds.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-InstallCertificate.test.ts
tests/charging-station/ocpp/2.0/OCPP20TestUtils.ts
tests/charging-station/ocpp/auth/OCPPAuthIntegration.test.ts
tests/charging-station/ocpp/auth/adapters/OCPP16AuthAdapter.test.ts
tests/charging-station/ocpp/auth/adapters/OCPP20AuthAdapter-Offline.test.ts
tests/charging-station/ocpp/auth/adapters/OCPP20AuthAdapter.test.ts
tests/charging-station/ocpp/auth/cache/InMemoryAuthCache.test.ts
tests/charging-station/ocpp/auth/strategies/CertificateAuthStrategy.test.ts
tests/charging-station/ocpp/auth/strategies/LocalAuthStrategy.test.ts
tests/charging-station/ocpp/auth/strategies/RemoteAuthStrategy.test.ts
tests/charging-station/ocpp/auth/utils/AuthHelpers.test.ts
tests/charging-station/ocpp/auth/utils/AuthValidators.test.ts