DEV Community

Discussion on: How to Test Your Fetch API Requests with Cypress

Collapse
 
shivasrini profile image
Shiva Srinivasan

How would you delete the fetch call when there is no visit happening but the fetch call is either a webhook or an event. For example we have a form page where new users type in their email. Once the email is typed in and the user has clicked on the next field in the form a fetch call is made to check if the email is already in use. How do I mock that? I cannot do cy.visit. What is the alternative?