title: How to mock callback function in Jest which triggers in redux-saga using redux-toolkit
body: <p>I have a dispatched action in React Component and saga listen this action and do async call</p>
  <p>COMPONENT: <code>dispatch(getGroups, (success) =&gt; setStatus(success))</code></p>
  <p>ACTION: <code>getGroups(state, action: { payload: (success: boolean) =&gt; void }) {},</code></p>
  <p>SAGA <code>yield takeLatest(getGroups, getGroupsList);</code></p>
  <pre><code>function* getGroupsList(action) {
    try {
      const groupsListResponse = yield call(enrollmentService.getGroupsList);
      action.payload(true);
    } catch (error: any) {
      action.payload(false);
    }
  }
  </code></pre>
  <p>So, I just don't know how I could mock returned callback inside redux-saga?</p>