Offtopic, but can anyone explain the differences between Zeit Now v2 and Netlify Edge?
We are working on adding support for a 100% local development workflow in Netlify Dev. It would be lovely to know what you think is missing from stateful local workflows in both Zeit and Netlify.
For instance Zeit can host a standard node server to serve your application if necessary https://zeit.co/docs/v2/deployments/official-builders/node-j...
Whereas on Zeit Now the root of the website can be a web server written in multiple languages, and offer the ability to make your own "Lambda Builder" if necessary https://zeit.co/docs/v2/deployments/builders/overview
/* /.netlify/functions/app/:splat 200!
You're just lying to yourself when saying local is the same as cloud...
Stuff like Lambda@Edge, Cloudflare Workers etc all have very strictly defined APIs that are executed on V8 (modified for security, but not enough to be incompatible). If you run a pure function on your local machine you can be pretty sure it’ll run on the edge.
We’ve already done this quite well with Docker - the image you run locally is cryptographically the same binary bytes you’ll run on production. It’s not that surprising to see it for edge functions.
But as far as I know, unit tests aren't the place to be in terms of serverless testing.
Integration and E2E tests are much more important and that's where the whole "run locally" stuff breaks down rather quickly.
You need to test them with the services they are using and replicating your whole cloud infrastructure locally is nearly impossible.