Open brendt-napp opened 4 years ago
Hello, I'd really like it if we could test something like the following
expectSaga(mySaga) .provide([ [fork(otherSaga), fakeTaskObj] ]) .fork(otherSaga) .cancel(fakeTaskObj)
my current workaround is to just use some helper functions and call those
call
export function cancelSelf() { return cancel(); } export function cancelTasks(tasks = []) { return cancel(tasks); }
and use them like so
expectSaga(mySaga) .provide([ [fork(otherSaga), fakeTaskObj] ]) .fork(otherSaga) .call(cancelTasks, fakeTaskObj)
Hello, I'd really like it if we could test something like the following
my current workaround is to just use some helper functions and
call
thoseand use them like so