)
assert.notStrictEqual(heartbeatEntry, undefined)
if (heartbeatEntry) {
- const types =
- heartbeatEntry.variableAttribute?.map((a: { type?: string; value?: string }) => a.type) ??
- []
+ const types = heartbeatEntry.variableAttribute.map(
+ (a: { type?: string; value?: string }) => a.type
+ )
assert.deepStrictEqual(types, [AttributeEnumType.Actual])
}
// Boolean variable (AuthorizeRemoteStart) should only include Actual
)
assert.notStrictEqual(authorizeRemoteStartEntry, undefined)
if (authorizeRemoteStartEntry) {
- const types =
- authorizeRemoteStartEntry.variableAttribute?.map(
- (a: { type?: string; value?: string }) => a.type
- ) ?? []
+ const types = authorizeRemoteStartEntry.variableAttribute.map(
+ (a: { type?: string; value?: string }) => a.type
+ )
assert.deepStrictEqual(types, [AttributeEnumType.Actual])
}
})
)
assert.notStrictEqual(modelVariable, undefined)
if (modelVariable) {
- assert.strictEqual(modelVariable.variableAttribute?.[0]?.value, TEST_CHARGE_POINT_MODEL)
+ assert.strictEqual(modelVariable.variableAttribute[0]?.value, TEST_CHARGE_POINT_MODEL)
}
const vendorVariable = reportData.find(
)
assert.notStrictEqual(vendorVariable, undefined)
if (vendorVariable) {
- assert.strictEqual(vendorVariable.variableAttribute?.[0]?.value, TEST_CHARGE_POINT_VENDOR)
+ assert.strictEqual(vendorVariable.variableAttribute[0]?.value, TEST_CHARGE_POINT_VENDOR)
}
})
)
assert.notStrictEqual(timeSourceEntry, undefined)
if (timeSourceEntry) {
- const reportedAttr = timeSourceEntry.variableAttribute?.find(
+ const reportedAttr = timeSourceEntry.variableAttribute.find(
(a: { type?: string; value?: string }) => a.type === AttributeEnumType.Actual
)
assert.notStrictEqual(reportedAttr, undefined)
assert.notStrictEqual(payload, undefined)
assert(payload.reportData != null)
const firstReport = payload.reportData[0]
- assert(firstReport.variableAttribute != null)
assert.strictEqual(firstReport.variableAttribute[0].type, attributeType)
assert.strictEqual(firstReport.variableAttribute[0].value, `Test Value ${index.toString()}`)
})
assert(payload.reportData != null)
const firstReport = payload.reportData[0]
assert(firstReport.variableCharacteristics != null)
- assert(firstReport.variableAttribute != null)
assert.strictEqual(firstReport.variableCharacteristics.dataType, testCase.dataType)
assert.strictEqual(firstReport.variableAttribute[0].value, testCase.value)
})
assert.notStrictEqual(payload, undefined)
assert(payload.reportData != null)
const firstReport = payload.reportData[0]
- assert(firstReport.variableAttribute != null)
assert.strictEqual(firstReport.variableAttribute.length, 1)
assert.strictEqual(firstReport.variableAttribute[0].type, AttributeEnumType.Actual)
})