Cypress · Middle · Question 34 of 77

Why shouldn't you mix async/await with Cypress commands?

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.

Further reading

Problem with a question

Cypress · Middle · question 34

Test yourself

Take the Cypress · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz