title: React app testing, how to test an axios post request with Jest?
body: <p>App.js looks like this, how would I test it with jest?</p>
  <pre><code> 
  
      handleClick = e =&gt; {
          axios
            .post(
              &quot;https://api.openweathermap.org/data/2.5/weather?q=&quot; +
                this.state.term +
                &quot;&amp;units=metric&amp;appid=&quot; +
                ApiKey
               
            ){...}
  
  </code></pre>
  <p>I know I have to create a mocking axios file and then test it like that, but it uses setState in the main App.js. I just want to test the fetch request/axios post with jest.</p>