Cypress · Middle · Question 61 of 77
Why does Cypress run each spec in a fresh browser context?
- 1Because each spec needs a different browser type
- 2To make the run slower but more detailed
- 3To isolate specs so one can't affect another
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.