In this lesson we will utilize generator functions and effect objects to test our sagas. We’ll walk through different scenarios and how to test each case with Jest.
I like Saga's but I hate testing them. It feels they are testing implementation. Aside from that, if you'd comment out your first "it", the second "it" would fail, because the second assume the first one ran already, no? If so that's not great imo. Re-arranging the tests would break them = bad.
^^^^
What Kevin said
That is a great point Kevin... I have seen others create a wrapper function that takes the saga generator and the second parameter the number of "next()" that's needed to get to the step you are actually testing. So it's a new generator instance for each test. That way you can move the tests around and it still works. Still not very pretty but solves that issue.
BTW it does give you some sort of testing ability compared to not being able to test at all if you used Redux Thunk.
Does anyone have an alternative to createMockTask? redux-saga/utils is no longer a part of redux-saga.