ReactRouter loaders capture the network interface so nock (or other) cannot be used #10290
itscesarvillar
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm asking here first before opening a bug.
I faced this problem, I am using loader new feature so routes ask for the data but the way it does it is not compatible with nock or other http assertion library.
You can use nock or mswjs (or any) if the component does the request but if you delegate to the router itself then nock is not able to intercept this request, no matter the i/o network technology (fetch, axios...)
I am right? do you think that's should be on the issues section? Thanks in advance, and if any of you have been able to do so, please share the way
Beta Was this translation helpful? Give feedback.
All reactions