DEV Community

loading...

Discussion on: The best way to test Redux Sagas

Collapse
worc profile image
worc

we have to check that every yield is not a call to getProfile()

i'm not sure that's entirely true. when i've gone down the path of testing sagas step-by-step, i've thrown gen.next()s into the body of the test without any assertions to get to the step i'm actually trying to test. it's not great and it's pretty brittle if you change your order of operations, but it's not silly either. i don't need to assert that the saga isn't calling a function.