Cypress · Middle · Question 56 of 77

What does cy.intercept route matching use by default for URLs?

Show the answer

Correct answer: Glob patterns or exact strings, plus regex if you pass one

Explanation

For example '/api/users/*' or { method: 'POST', url: /\/api\/orders/ }. Narrow matching avoids catching unrelated requests.

Further reading

Problem with a question

Cypress · Middle · question 56

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