https://promptfoo.dev/ logo
Equality assertion for JSON fails for identical JS...
# ❓|questions
s
I've build a ~50 test cases using Equality assertions of JSON objects. Tests are wrote in CSV files. For some reason about 10% of the test cases fails although the result and expected JSON objects look identical to me and even after I literally copy-pasted the result as expected and running the eval again it's still failing. This is really annoying because I can trust the ovall success rate. Any idea why this is happening? Below is an example: [FAIL] Expected output "{ "symbol": "TSLA", "action": "SELL", "fraction": 1, "price": 269 }" to equal "{ "symbol": "TSLA", "action": "SELL", "fraction": 1, "price": 269 }" --- { "symbol": "TSLA", "action": "SELL", "fraction": 1, "price": 269 }
j
Did you already double check the row values in the failing rows from the .csv? A typo in one of the
__expeced
row values threw me off for a bit.