Cypress · Middle · Question 35 of 77
What does cy.wrap() do?
- 1Combines several specs into one test file
- 2Turns a value or Promise into a Cypress subject
- 3Wraps the page in a new iframe for isolation
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.