Skip to content Skip to sidebar Skip to footer

Cypress Assertion Fails But Test Passes

Doing some integration tests on API. One of the tests passes and the other fails when assertions are basically the same. Confused about how cypress handles async/promises. context(

Solution 1:

I see that you manage to fix your code. About the async/await - Cypress does not support it. See https://docs.cypress.io/guides/core-concepts/introduction-to-cypress.html#Commands-Are-Asynchronous.

In general, Cypress queue all the actions and then execute them. So if your code has any synchronous part it will not work. Also, they're not supporting the async/await feature, so tests using those might be flaky.

Post a Comment for "Cypress Assertion Fails But Test Passes"