title: store.dispatch cannot read property 'then' of undefined
body: <p>I am trying to test my <code>async</code> action and I get this error:</p>
  
  <blockquote>
    <p>store.dispatch cannot read property 'then' of undefined</p>
  </blockquote>
  
  <p>I tried to use the <code>then</code> on the <code>actionTypes</code> (I am sorry, that is an <code>actionCreator</code> but I imported it as <code>actionType</code>), but it goes from <code>undefined</code> to:</p>
  
  <blockquote>
    <p>TypeError: actionTypes.fetchGitHubDataAsync(...).then is not a function.</p>
  </blockquote>
  
  <pre class="lang-js prettyprint-override"><code>it('Dispatches BOOKS_SUCCESS after fetching books', () =&gt; {
     // Response body sample
     const mockData = [
     {
         "name": "javascript",
         "display_name": "JavaScript",
         "short_description": "JavaScript (JS) is a lightweight interpreted programming language with first-class functions.",
         "description": "JavaScript (JS) is a lightweight interpreted or JIT-compiled programming language with first-class functions. While it is most well-known as the scripting language for Web pages, many non-browser environments also use it, such as Node.js, Apache CouchDB and Adobe Acrobat. JavaScript is a prototype-based, multi-paradigm, dynamic language, supporting object-oriented, imperative, and declarative (e.g. functional programming) styles.",
         "created_by": "Brendan Eich",
         "released": "December 4, 1995",
         "created_at": "2016-11-28T18:41:00Z",
         "updated_at": "2019-11-06T15:05:24Z",
         "featured": true,
         "curated": true,
         "score": 7954.724
     }
     ]
  
     fetchMock.getOnce('https://api.github.com/search/topics?q=javascript',
                  { body: { results: mockData }})
  
     const expectedActions = [
           { type: actionTypes.FETCH_GITHUB_DATA},
     ]
     store.dispatch(actionTypes.fetchGitHubDataAsync())
               .then(() =&gt; {
                   expect(store.getActions()).toEqual(expectedActions)
     })
  })
  </code></pre>
  
  <p>actions js file</p>
  
  <pre class="lang-js prettyprint-override"><code>export const fetchGitHubDataAsync = () =&gt; {
      return dispatch =&gt; {
          fetch('https://api.github.com/search/topics?q=javascript', {
              headers: {
                'Accept': 'application/vnd.github.mercy-preview+json'
              }
            })
              .then(res =&gt; res.json())
              .then(json =&gt; {console.log('json', json.items.slice(0, 5)); 
              return dispatch({type: 'FETCH_GITHUB_DATA', payload: json.items.slice(0, 5)})});
      }
  }
  </code></pre>