我们正在创建一个对象,该对象用于将数据传递给验证函数时对其进行验证。我们想提供对象中包含的元素的总价值。
var TestDataAmountsInitial = {
"TestNumner1": 34.98,
"TestNumner2": 10.00,
"TestTotal": this.TestNumner1 + this.TestNumner2
};
// logging output
it(`----------------------------------------`, () => {
console.log("DEBUG: Test Data");
console.log(`The Data: TestNumner1: ${TestDataAmountsInitial.TestNumner1}`);
console.log(`The Data: TestNumner2: ${TestDataAmountsInitial.TestNumner2}`);
console.log(`The Data: TestTotal: ${TestDataAmountsInitial.TestTotal}`);
});
// Console output
DEBUG: Test Data
The Data: TestNumner1: 34.98
The Data: TestNumner2: 10
The Data: TestTotal: NaN