title: I get TypeError: Cannot read property 'then' of undefined when I try to test async action
body: <p>I have a problem testing my async action in reactjs.
  Here is my code:</p>
  
  <pre><code>export function fillStoryBoard(snippetsLink, channel, uniqueStoryObj, isUniqueStorySearch) {
  
  return function(dispatch){
          for (var i = 0; i &lt; snippetsLink.length; i++) {
              loadStorySnippet(channel, snippetsLink[i], (i + 1),dispatch);
          }
      }
   }
  
  function loadStorySnippet(channel,snippetsLink,indexValue,dispatch){
      return axios.get(ServiceUrls.prototype.getServicesDfltUrl()+snippetsLink)
          .then(response =&gt; {
              dispatch({
                  type: "FILL_STORYBOARDS",
                  payload: {
                      "channelName": channel,
                      "storiesSnippet": response.data,
                      "order":indexValue
                  }
              });
          }).catch(function(response){
  
      });
   }
  </code></pre>
  
  <p>So my asnc call is in a function which is not exported and there is a function calling this asnc function in a for loop.</p>
  
  <p>Now here is my test:</p>
  
  <pre><code>it('should dispatch type: FILL_STORYBOARDS with what is returned from server as a payload', () =&gt; {
      nock(ServiceUrls.prototype.getServicesDfltUrl())
          .get('/snippet/111')
          .reply(200, {"id":1,"headline":"",
              "label":"Other",
              "imgUrl":"",
              "postDate":0});
  
  
      const expectedActions = [
          { "type": "FILL_STORYBOARDS","payload": { "channel": "",
              "storiesSnippet": {"id":1,"headline":"",
                  "label":"Other","imgUrl":"" +
                  "",
                  "postDate":0},
              "order":1 } }
      ]
      const store = mockStore();
      return store.dispatch(fillStoryBoard(["snippet/111"], "")).then(() =&gt; {
          expect(store.getActions()[0].type).to.equal(expectedActions[0].type);
      })
  })
  </code></pre>
  
  <p>Now the problem is when run the test I get:</p>
  
  <pre><code>TypeError: Cannot read property 'then' of undefined
  </code></pre>
  
  <p>Any idea how I can fix this? </p>