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 if statement #368
Comments
You can mock import {expectSaga} from 'redux-saga-test-plan';
import {call} from 'redux-saga-test-plan/matchers';
test('fetchCustomerById', () =>
expectSaga(fetchSaga)
.provide([[call.fn(rest.getCustomerById), true]])
.put(fetchCustomerSuccess(expectedCustomer)
.dispatch(action.fetchCustomerById())
.silentRun()); In the test, reset.getcustomerById would return true. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want to test the following saga:
I'm trying this:
And the test doesn't pass. Got this error:
Assertion 2 failed: put effects do not match
Is there a way to pass undefined payload?
Thanks,
Georgi
The text was updated successfully, but these errors were encountered: