Cypress · Senior · Question 29 of 76

How do service workers interfere with Cypress network stubbing?

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.

Further reading

Problem with a question

Cypress · Senior · question 29

Test yourself

Take the Cypress · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz