As described here, Cypress doesn't have the ability to get involved with the server process as it stands - it's just about the client. In a bid to ensure that my test environment is as identical as possible to my prod environment, I find the suggestion of rendering on the client just for the sake of tests to be less than ideal.
It'd be awesome if we were provided instructions on how to make our server make requests through the same network proxy layer that Cypress works or if Cypress could provide some kind of plugin to handle that.
All
This one actually looks as a very good idea.
I got into the same problem when I need to mock some API for tests (they are not full e2e) and I also have server side rendering with Next.js
So it works beautiful without SSR and I'm a bit stuck in term of how to mock SSR requests as well.
Users of Nuxt and Next - as well as any MVC framework - will heavily benefit from something like this.
Is there any way to mount cypress/server as a piece of express middleware?
Most helpful comment
Users of Nuxt and Next - as well as any MVC framework - will heavily benefit from something like this.