DEV Community

Discussion on: The best way to test Redux Sagas

noriste profile image
Stefano Magni

I don't know if the APIs are changed, at the moment (Feb, 2020) runSaga returns a Task that has a toPromise() method.
So await runSaga(...).done does not make sense, you need to do

const task = runSaga(...)
const result = await task.toPromise()
Enter fullscreen mode Exit fullscreen mode

anyway: thank you so much for the article 😊