What problem do you want to solve?
One of MSW's most useful debugging features is that (by default) it emits a console warning if it detects a request that doesn't match any defined routes. As far as I can tell, Mentoss doesn't have this feature, even as an option. You can assert that all defined routes matched a request, but you can't assert that all requests matched a defined route.
What do you think is the correct solution?
When there's a request that doesn't match a defined route, MSW emits a warning that looks like this:
console.warn
[MSW] Warning: captured a request without a matching request handler:
• GET http://127.0.0.1:55984/api
If you still wish to intercept this unhandled request, please create a request handler for it.
Read more: https://mswjs.io/docs/getting-started/mocks
That's great, actionable output when figuring out why my tests aren't working. I look at that message and say "OK, I need to either mock the /api route, or prevent that request from being fired during this test."
Participation
Additional comments
No response
What problem do you want to solve?
One of MSW's most useful debugging features is that (by default) it emits a console warning if it detects a request that doesn't match any defined routes. As far as I can tell, Mentoss doesn't have this feature, even as an option. You can assert that all defined routes matched a request, but you can't assert that all requests matched a defined route.
What do you think is the correct solution?
When there's a request that doesn't match a defined route, MSW emits a warning that looks like this:
That's great, actionable output when figuring out why my tests aren't working. I look at that message and say "OK, I need to either mock the
/apiroute, or prevent that request from being fired during this test."Participation
Additional comments
No response