You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Remix + MSW example there is only one example with handlers that return 200.
But how should MSW be used with handlers that return 400, 500?
It's not clear how to use resetHandlers() or dynamic mock scenarios within a Remix app.
Trying to import ant reset handlers in a test doesn't work, because the server instance is only working within a entry.server.tsx file.
Reacted by Povilas Dadelo, Artem Zakharchenko and John Norman Capule
Hi, @nergro. This is a fantastic suggestion. I think where the examples fall flat right now is that they don't mention how to use request handler overrides (.use()). We need to add at least one example of a response override to each example.
Activity
kettanaito commentedon Mar 2, 2024
Hi, @nergro. This is a fantastic suggestion. I think where the examples fall flat right now is that they don't mention how to use request handler overrides (
.use()). We need to add at least one example of a response override to each example.[-]Remix + MSW + Playwright[/-][+]Showcase runtime handlers in E2E examples[/+]joshuaellis commentedon Jan 14, 2025
Bumping this, is there any guidance on how to do this? Modifying the current example test to look like:
doesn't do anything so the test still passes. I've not been able to find anything, it feels like a bug but from seeing this, maybe it isn't?