You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is highly problematic behaviour for me because it leaves a lot of room for random and unexpected effects to be yielded without the test alerting me to it.
Is there a way to make expectSaga() strict? I would love it if it fails the test if we skipped an effect, or called effects in the wrong order.
The text was updated successfully, but these errors were encountered:
P.S I am aware that testSaga is made for unit tests, but I have to test channels, which aren't really supported by testSaga. It'd still be nice to be able to test order of things.
From what I see currently,
expectSaga()
only fails a test if an effect was expected, but that effect was run with the wrong arguments.Given the same saga:
✅ For example, this will pass:
✅ This will also pass (we totally don't test for any calls):
✅ Even this will pass (even though we are missing a test for
call
in between there):🚨 Only this will fail:
This is highly problematic behaviour for me because it leaves a lot of room for random and unexpected effects to be yielded without the test alerting me to it.
Is there a way to make expectSaga() strict? I would love it if it fails the test if we skipped an effect, or called effects in the wrong order.
The text was updated successfully, but these errors were encountered: