Cypress · Middle · Question 35 of 77

What does cy.wrap() do?

Show the answer

Correct answer: Turns a value or Promise into a Cypress subject

Explanation

For example cy.wrap(apiClient.getUser()) waits for the Promise and lets you chain assertions.

Further reading

Problem with a question

Cypress · Middle · question 35

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