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
How to use getContext in testSaga unit test #384
Comments
@sbitproz Thanks for using this library. Also, feel free to propose your opinion to improve this. |
Hi @jp928 Thanks for the efficient reply. Is it worth adding a detail about this on the documentation? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Context
In the application we adopted Sagas to manage our side effects. We've tried to use this excellent library to improve our test readability of our tests and that the ordering of the yields are correct.
Our application provides our apis through the application using the Context API. This is where we've hit a slight speed bump in the test with
getContext
.In our Sagas we're accessing the api through
getContext
from theredux-saga/effects
package. e.g.In our tests we're trying to mock this dependency
Our generator function fails to execute the mock function provided through the
getContext
.getContext
in the correct way?getContext
when usingtestSaga
? (current this mocking works inexpectSaga
)The text was updated successfully, but these errors were encountered: