server.listen({ onUnhandledRequest: 'error' })server.listen({ onUnhandledRequest: 'error' }) is right. onUnhandledRequest controls what MSW does with requests that no handler matches. The default is 'warn', which is easy to miss in test output. 'error' makes the problem obvious. The tempting setupServer({ strict: true }) option is wrong. It isn't an MSW API, and neither is resetHandlers('error').
Read more