Cypress · Middle · Question 34 of 77
Why shouldn't you mix async/await with Cypress commands?
- 1Cypress tests can't use any JavaScript functions
- 2
awaitslows down Cypress commands by a lot - 3Commands aren't Promises; awaiting them breaks the queue
Show the answer
Correct answer: Commands aren't Promises; awaiting them breaks the queue
Explanation
Cypress commands are enqueued and chainable. Use .then() to work with values; cy.wrap() can wrap a real Promise.