Cypress · Middle · Question 61 of 77

Why does Cypress run each spec in a fresh browser context?

Show the answer

Correct answer: To isolate specs so one can't affect another

Explanation

Fresh contexts prevent leaked state between files. Combined with test isolation, each test starts clean.

Further reading

Problem with a question

Cypress · Middle · question 61

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