Cypress · Middle · Question 13 of 77

What does the validate option of cy.session do?

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.

Further reading

Problem with a question

Cypress · Middle · question 13

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