title: Dispatch is not a function when testing a redux action
body: <p>I'm learning to write tests for action creators with Jest and Enzyme. This is an action creator that I am using with React Native.</p>
  
  <p>Please consider the code below:</p>
  
  <pre><code>import {
      FETCH_FAIL
  } from './types';
  
  export const fetchFail = (dispatch) =&gt; {
      dispatch({
          type: FETCH_FAIL,
          payload: "An error occurred. Try again later."
      });
  };
  </code></pre>
  
  <p>I wrote the following test for this action creator:</p>
  
  <pre><code>import configureStore from 'redux-mock-store';
  import thunk from 'redux-thunk';
  
  const middlewares = [thunk];
  const mockStore = configureStore(middlewares);
  
  test('should fail fetch', async () =&gt; {
      const payload = {
          type: FETCH_FAIL,
          payload: "An error occurred. Try again later."
      }
  
      const store = mockStore({ data:[], isConnected: false });
      expect(store.dispatch(actions.fetchFail())).toEqual(payload);
  })
  </code></pre>
  
  <p>My test fails with the following result:</p>
  
  <blockquote>
    <p>TypeError: dispatch is not a function</p>
  </blockquote>
  
  <p>What am I doing wrong?</p>