Block all unmocked requests #874
-
Is there any way to block all unmocked request for whole testing environment? |
Beta Was this translation helpful? Give feedback.
Answered by
kettanaito
Aug 21, 2021
Replies: 1 comment 8 replies
-
Hey, @amd-9. Yes, you can set the server.listen({ onUnhandledRequest: 'error' }) |
Beta Was this translation helpful? Give feedback.
8 replies
Answer selected by
amd-9
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, @amd-9.
Yes, you can set the
onUnhandledRequest
option to "error". This will result in an error whenever an unhandled request happens, failing your test:See the docs.