Skip to content

How to debug MSW in my React tests? #1385

Answered by kettanaito
jrock2004 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey, @jrock2004.

We have a documentation recipe on debugging uncaught requests. You can use it also to debug if MSW is working at all by setting the onUnhandledRequest: "error" option in server.listen() and making some unhandled arbitrary request. If it errors, MSW works; if it doesn't, your setup is incorrect and you should revisit Node integration instructions.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jrock2004
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants