2

I can only mock the return value of the generator function

expectSaga(func1)
  .provide({
    call: ({ fn }, next) => (fn === api) ? "this is mock return value" : next() 
  })
  .dispatch({ type: "TEST_ACTION" })
  .run()

Is there anyway to mock function rather that mock the return value?

0 Answers0