import {
type ChargingStationInfo,
type ChargingStationTemplate,
+ type ConnectorStatus,
type EvseStatus,
OCPPVersion,
} from '../../src/types/index.js'
const chargingStationTemplate = {
baseName,
} as ChargingStationTemplate
- const chargingStation = {} as ChargingStation
+ const chargingStation = {
+ evses: new Map<number, EvseStatus>(),
+ connectors: new Map<number, ConnectorStatus>(),
+ } as ChargingStation
await it('Verify getChargingStationId()', t => {
expect(getChargingStationId(1, chargingStationTemplate)).toBe(`${baseName}-00001`)
expect(() => {
validateStationInfo(chargingStation)
}).not.toThrow()
- chargingStation.evses = new Map<number, EvseStatus>()
chargingStation.stationInfo.ocppVersion = OCPPVersion.VERSION_201
expect(() => {
validateStationInfo(chargingStation)