-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testing RSAA api calls #242
Comments
SOLVEDSo I passed the
and it worked. |
@sudh-0 you can also pass a global https://github.com/agraboso/redux-api-middleware#createmiddlewareoptions |
good gosh thanks for reporting this. I just had the exact same issue. |
@nason
So, I am trying to write test cases for api calls. I tried following the
readme
but the test-case is always gettingfailed
.On giving relative url link, I am getting this, instead of
SUCCESS
:I also tried giving the full endpoint, and got this:
Is this aredux-thunk
problem or is it something else? Isn't there any other way to mockredux-api-middleware
actions?UPDATE
This is not a
redux-thunk
problem. I implemented a sample test case usingredux-thunk
and nativefetch
method and it worked perfectly in tests.Apparently,
redux-api-middleware
isn't able to do the network-request and I don't know why, in spite of usingfetch
internally.The text was updated successfully, but these errors were encountered: