title: How to cover function using Jest and Axios?
body: <p>How to cover searchLocation() using Jest and Axios?</p>
  
  <pre><code>export const searchLocation = () =&gt; {
      return dispatch =&gt; {
          dispatch(searchLocationStart());
          axios.get("https://api.github.com/users/octocat")
              .then((data) =&gt; dispatch(searchLocationSuccess(data.data)))
              .catch(() =&gt; dispatch(searchLocationError));
      }
  }
  </code></pre>