title: How to hit axios request from Jest test page
body: <p>I am trying to hit an axios request from my code.test.js file here:</p>
  
  <pre><code>import axios from 'axios'
  import sinon from 'sinon';
  
  describe('get-data', () =&gt; {
  
  let data = {start_date:"2017-06-30",end_date:"2017-07-07",graph:"all"}
  
  let sandbox;
  let server;
  beforeEach(() =&gt; {
      sandbox = sinon.sandbox.create();
      server = sandbox.useFakeServer();
  });
  afterEach(() =&gt; {
      server.restore();
      sandbox.restore();
  });
  
  it('should display a blankslate', (done) =&gt; {
      axios.get('/api/get/data?data='+JSON.stringify(data))
          .then((response.data) =&gt; {
          console.log(response)
              /*expect($('#users').innerHTML)
              .to.equal('The list is empty.')*/ })
          .then(done, done);
      setTimeout(() =&gt; server.respond([200,
          { 'Content-Type': 'application/json' },
      '[]']), 0);
  });
  })
  </code></pre>
  
  <p>But I get console.log(response.data) as undefined.</p>
  
  <p>Can anyone tell me how to get data here in response ?</p>