title: How to test axios interceptors using jest?
body: <p>I'm trying to test the following code:</p>
  
  <pre class="lang-js prettyprint-override"><code>import axios from 'axios';
  import { history } from './ReduxService';
  
  axios.interceptors.response.use(response =&gt; response,
      (error) =&gt; {
          if ((error.response &amp;&amp; error.response.status === 408) || error.code === 'ECONNABORTED') {
              history.push('/error');
          }
          return Promise.reject(error);
      }
  );
  </code></pre>
  
  <p>Any advice on how to cover it?</p>