Why do I get cy.intercept is not a function?


I am trying to intercept a POST request but I’m getting the following error:

enter image description here

This is my test file code:

enter image description here

I’ve found a similar question:

cy.intercept is not a function Cypress test

That question was solved by upgrading the cypress version above v5.3. But I already have cypress version 6.14.15. The error is seemingly only replicating on the .Then() part, which is weird because the cy.intercept function is called in the previous line of code and NOT in the .Then() part. where is the problem exactly?

Source: Vue – Stack Overflow

October 28, 2021
Category : News
Tags: axios | cypress | HTTP | mocking | Vue.js

Leave a Reply

Your email address will not be published. Required fields are marked *

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.