https://cypress.io logo
If you are planning to use .wait() on the intercep...
# best-practices
b
If you are planning to use .wait() on the intercept, then you should know cy.wait() will pass if at least one request matching the intercept has been made. So it may give you a false positive if you create the intercept too early and wait at a later time. A recommendation would be:
Copy code
cy.intercept()
// action to invoke request
cy.wait()