Cypress · Senior · Question 29 of 76
How do service workers interfere with Cypress network stubbing?
- 1Service workers delete all fixtures between tests
- 2Requests served by the worker bypass
cy.intercept - 3Service workers make Cypress unable to visit pages
Show the answer
Correct answer: Requests served by the worker bypass cy.intercept
Explanation
Unregister service workers in tests, or disable them in test builds, so stubs behave predictably.