'CALLRESULT',
'CALLERROR',
'CALLRESULTERROR',
+ 'reservability',
],
},
},
const serviceImpl = service as unknown as TestableOCPP20IncomingRequestService
return {
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-explicit-any
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment
buildReportData: (serviceImpl as any).buildReportData.bind(service),
handleRequestCertificateSigned: serviceImpl.handleRequestCertificateSigned.bind(service),
handleRequestClearCache: serviceImpl.handleRequestClearCache.bind(service),
getVariableData: [
{
component: {
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
instance: TEST_CONNECTOR_VALID_INSTANCE,
name: OCPP20ComponentName.Connector,
},
import { afterEach, beforeEach, describe, it } from 'node:test'
import type { OCPP20RequestStartTransactionRequest } from '../../../../src/types/index.js'
-import type { OCPP20ChargingProfileType, OCPP20ChargingRateUnitType } from '../../../../src/types/ocpp/2.0/Transaction.js'
+import type {
+ OCPP20ChargingProfileType,
+ OCPP20ChargingRateUnitType,
+} from '../../../../src/types/ocpp/2.0/Transaction.js'
/**
* @file Tests for OCPP20IncomingRequestService RequestStartTransaction
chargingProfilePurpose: OCPP20ChargingProfilePurposeEnumType.TxProfile,
chargingSchedule: [
{
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
chargingRateUnit: 'A' as OCPP20ChargingRateUnitType,
chargingSchedulePeriod: [
{
chargingProfilePurpose: OCPP20ChargingProfilePurposeEnumType.TxDefaultProfile,
chargingSchedule: [
{
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
chargingRateUnit: 'A' as OCPP20ChargingRateUnitType,
chargingSchedulePeriod: [
{
chargingProfilePurpose: OCPP20ChargingProfilePurposeEnumType.TxProfile,
chargingSchedule: [
{
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
chargingRateUnit: 'A' as OCPP20ChargingRateUnitType,
chargingSchedulePeriod: [
{
evseConfiguration: { evsesCount: 3 },
heartbeatInterval: Constants.DEFAULT_HEARTBEAT_INTERVAL,
ocppRequestService: {
- requestHandler: async (chargingStation: any, commandName: any, commandPayload: any) => {
+ requestHandler: async (
+ _chargingStation: unknown,
+ commandName: unknown,
+ commandPayload: unknown
+ ) => {
if (commandName === OCPP20RequestCommand.TRANSACTION_EVENT) {
sentTransactionEvents.push(commandPayload as OCPP20TransactionEventRequest)
return Promise.resolve({})
evseConfiguration: { evsesCount: 1 },
heartbeatInterval: Constants.DEFAULT_HEARTBEAT_INTERVAL,
ocppRequestService: {
- requestHandler: async (chargingStation: any, commandName: any, commandPayload: any) => {
+ requestHandler: async (
+ _chargingStation: unknown,
+ commandName: unknown,
+ commandPayload: unknown
+ ) => {
if (commandName === OCPP20RequestCommand.TRANSACTION_EVENT) {
throw new Error('TransactionEvent rejected by server')
}
import { expect } from '@std/expect'
import { afterEach, beforeEach, describe, it, mock } from 'node:test'
-import type { ChargingStation, EvseStatus } from '../../../../src/charging-station/index.js'
+import type { ChargingStation } from '../../../../src/charging-station/index.js'
import type {
+ EvseStatus,
FirmwareStatus,
type OCPP20ResetRequest,
type OCPP20ResetResponse,
ReasonCodeEnumType,
Reservation,
ResetEnumType,
- ResetStatusEnumType
+ ResetStatusEnumType,
} from '../../../../src/types/index.js'
import { createTestableIncomingRequestService } from '../../../../src/charging-station/ocpp/2.0/__testable__/index.js'
{
attributeValue: 'true',
component: {
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
instance: TEST_CONNECTOR_VALID_INSTANCE,
name: OCPP20ComponentName.Connector,
},