Cypress throws an assertion error but the result is correct #28460
-
Cypress throws an assertion error but the result is correct. To me the comparison looks correct but cypress gives an error message. Error message:
I have no idea whats wrong with it?! Does someone has experince with this issue? Code:
The value for a global variable I get for instance like this:
This code is the part that causes the assertion error message:
With this code above I get the error message, for example: In other cases with assertions like in this example below the comparison works:
Any idea what could cause this error? Thank you very much |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Ah, ok, it´s like this: Solution 1: Convert valueOfCalculation to a string
Solution 2: Convert value3 to a number
Sorry for interruption :-) |
Beta Was this translation helpful? Give feedback.
Ah, ok, it´s like this:
Solution 1: Convert valueOfCalculation to a string
Solution 2: Convert value3 to a number
Sorry for interruption :-)