-
Notifications
You must be signed in to change notification settings - Fork 129
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
SagaTestError: call expectation unmet: #289
Comments
Having a similar case with jest mocking. not sure yet why they dont match |
@maxammann do you mind to post your test case? |
The reason for this is that redux-saga-test-plan probably checks for identify (===) when comparing the fn and arguments in a CALL effect comparision. Now, jest is a bit crazy when it comes to mocking modules. It has a feature to reset the modules (jest.resetModules()). If you import a function from the same location before that and after that it will not the identical. So after a call to jest.resetModules() you have to reimport EVERY module you use in the expect code. With out this call the test will fail. |
It would be cool if the serializer could show that the arguments serialize to the same string but have a different identity. |
As a workaround it is also possible to use the |
Can you please give a more detailed example of using |
Sure, see the docs here: https://github.com/jfairbank/redux-saga-test-plan/blob/7f78a0742f94c67a221a9a1370b65f65e38b66b6/docs/integration-testing/partial-matching.md |
Hi, I am testing if a yield call has been executed. I receive this error which I probably misunderstand, but as far as I can tell the function is called with the same parameters in both the saga and the test file.
Does anyone know why the expectation is unmet?
Let me know if I need to post the saga/test suite.
` SagaTestError:
call expectation unmet:
The text was updated successfully, but these errors were encountered: