Hacker News new | ask | show | jobs
by rclayton 2344 days ago
How is this the best/most flexible approach? What if you decide to move from REST to GQL? GQL to websockets? By mocking the HTTP endpoint you’re too low in the stack. At that point, I feel like you might have better success with using the actual backend and swap out the DB with mock data.
1 comments

I always use this approach for my E2E tests. This way I test the backend as well as the frontend. Harder to setup properly though.