GET requests not intercepted using RTK Query on React Native #2080
Unanswered
martinbartolo
asked this question in
Q&A
Replies: 1 comment 2 replies
-
did you figure it out ? @martinbartolo , I'm having the same issue |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm working on a React Native project with RTK Query and I'm trying to mock my API calls using MSW. I've set up MSW and it's working fine for POST and PATCH requests, but it's not intercepting GET requests.
Here is my jest config
Here is my jest setup
Here is my MSW handler
Here is my RTK Query API
I'm using the useGetLegalTosQuery hook to call the API in my react component
This is my test
When I run the test, the GET request to /legal/tos is not intercepted by MSW and I get the warning
Am I missing a step in my set-up here or am I doing something wrong?
Beta Was this translation helpful? Give feedback.
All reactions