Cypress · Middle · Question 13 of 77
What does the validate option of cy.session do?
- 1Checks the restored session still works, recreating it if not
- 2Validates the user's password strength before logging in
- 3Checks that the session ID has a valid format
Show the answer
Correct answer: Checks the restored session still works, recreating it if not
Explanation
If a token expired, validation fails and Cypress runs the setup again, preventing confusing failures later in the test.