Open birdwell opened 4 years ago
It gets stuck on the Client.history(channel) and doesn't continue in the generator function to the final line.
Client.history(channel)
Saga
export const loadChat = async channel => { if (channel) { await Client.history(channel); } }; function* setChannels(action: ReturnType<typeof setChannelsAction>) { const { channels } = action.payload; yield call( loadChat, channels.find(...) ); yield put(setChannelGroupsAction(channelGroups)); }
Test
return expectSaga(setChannelsSaga, setChannels({ channels, channelGroups })) .withState(defaultState) .call(loadChat, channels[2]) .put(setChannelGroupsAction(channelGroups)) .run();
It gets stuck on the
Client.history(channel)
and doesn't continue in the generator function to the final line.Saga
Test