Amy Blankenship
1 min readMar 27, 2020

--

I don’t think the put line does anything. The takeLatest will happen before the action is dispatched, and then presumably when is eventually dispatched, the function passed as the second argument is called with the action. My test passes without it.

But I think for the put to be used, you’d need something more like

expect(generator.next(put(someAction)).value).toEqual(takeLatest(…))

--

--

Amy Blankenship
Amy Blankenship

Written by Amy Blankenship

Full Stack developer at fintech company. I mainly write about React, Javascript, Typescript, and testing.

No responses yet