Saga test example does not work for redux-saga <1.0.0
noahnu opened this issue · comments
Noah commented
Describe the bug
The duck test which "assume sagas don't exist", assumes you're using redux-saga >= 1.0.0.
To Reproduce
Using redux-saga v0.16.0, try wait for a saga to complete via:
dont-waste-your-ducking-time/src/good.saga.test.js
Lines 98 to 99 in 5515d84
Expected behavior
I don't expect dont-waste-your-ducking-time to support old versions of redux-saga, so a note in the comments, or even the presence of this issue should be sufficient.
< v1.0.0 fix
This works:
store.sagaTask.cancel()
await store.sagaTask.done
Michael Rose commented
@all-contributors please add @noahnu for docs
allcontributors commented
I've put up a pull request to add @noahnu!