tophat / dont-waste-your-ducking-time

:rooster: An opinionated guide on how to test Redux ducks
Apache License 2.0
27 stars 1 forks source link

Saga test example does not work for redux-saga <1.0.0 #23

Closed noahnu closed 4 years ago

noahnu commented 4 years ago

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:

https://github.com/tophat/dont-waste-your-ducking-time/blob/5515d841f060555a1740ac015dfe525f6ed70ae0/src/good.saga.test.js#L98-L99

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
msrose commented 4 years ago

@all-contributors please add @noahnu for docs

allcontributors[bot] commented 4 years ago

@msrose

I've put up a pull request to add @noahnu! :tada: