Closed hornta closed 1 month ago
Not that I can think of immediately, but this is kind of like a catch-all if no other. Would be interesting to have this feature. Can you have a little browse of the (not very big) source code and see if the match code can be made to do this? Maybe it can accept a function or something.
The fakeserver can take a catch-all response but it doesn't help me being able to throw when that response is matched. I tend to use https://mswjs.io/ in other projects so inspiration can be taken from there https://mswjs.io/docs/recipes/debugging-uncaught-requests
Maybe the fakeserver can emit an event like "onUnhandledRequest"?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I've setup my test suite to mock every response my application performs to our REST API but I feel like it's common to forget to mock some API:s so I would want a way for our tests to fail when a non-mocked API is called upon. Is something like that possible with nise/sinon?