From 7edfbc133ab8b7d617cbb1e4fbda4acd4c63800d Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 26 Jul 2024 17:44:04 +0200 Subject: [PATCH] refactor(test): code cleanups MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- tests/charging-station/Helpers.test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/charging-station/Helpers.test.ts b/tests/charging-station/Helpers.test.ts index 2a3c799c..15f72f3b 100644 --- a/tests/charging-station/Helpers.test.ts +++ b/tests/charging-station/Helpers.test.ts @@ -12,6 +12,7 @@ import { BaseError } from '../../src/exception/index.js' import { type ChargingStationInfo, type ChargingStationTemplate, + type ConnectorStatus, type EvseStatus, OCPPVersion, } from '../../src/types/index.js' @@ -21,7 +22,10 @@ await describe('Helpers test suite', async () => { const chargingStationTemplate = { baseName, } as ChargingStationTemplate - const chargingStation = {} as ChargingStation + const chargingStation = { + evses: new Map(), + connectors: new Map(), + } as ChargingStation await it('Verify getChargingStationId()', t => { expect(getChargingStationId(1, chargingStationTemplate)).toBe(`${baseName}-00001`) @@ -101,7 +105,6 @@ await describe('Helpers test suite', async () => { expect(() => { validateStationInfo(chargingStation) }).not.toThrow() - chargingStation.evses = new Map() chargingStation.stationInfo.ocppVersion = OCPPVersion.VERSION_201 expect(() => { validateStationInfo(chargingStation) -- 2.34.1