Deeply error message while running script through .csv file

Steps to reproduce:

  1. API Response file-
    “rewards”: {{
    “balance”: “6.66”,
    “currencyCode”: “USD”
    }},

  2. Postman script
    pm.test(“data verification”, function () {
    let jsonData = pm.response.json();
    pm.expect(jsonData.rewards.balance).to.eql(data.rewardsbalance);
    });

  3. .csv file
    image

  4. Running script through collection ,getting below error messgae

Solution-If I change script as “pm.expect(jsonData.rewards.balance).to.include(data.rewardsbalance);” its working perfectly.

Apart from this any other solution?

Thanks!!!

@aakashjain8693 I am guessing (don’t know what the response body looks like) that you’re doing a string check to be deeply equal to a floating-point number.

This screenshot has some pointers to verify your test with (you can use parseFloat on your response, which probably seems to be a string):

Thanks!! @singhsivcan

Looks like you added foo value in Params as 6.66 which is hard coded. I am getting the data from .csv file, Any other solution?