title: Unit tests fail with error "Cypress command timeout of '4000ms' exceeded."
body: <p>I am using cypress and react-testing library in order to execute unit tests on my component. However, I am running into the the below error when the test executes </p>
  
  <p>"Cypress command timeout of '4000ms' exceeded."</p>
  
  <p>I notice that the actual test that I have written succeeds. But there is an error in an "after all" hook that is somehow inserted. I do not have an "after all" hook in my test spec. I wanted to know where this could be invoked from since I do not have it in my code.</p>
  
  <p>Additional Info: I am using webpack and istanbul plugins that are added in the plugins/index.js file</p>
  
  <p>test-spec.js</p>
  
  <pre class="lang-js prettyprint-override"><code>import React from 'react';
  import {render, fireEvent, cleanup} from '@testing-library/react';
  import Greeting from '../../src/utils/testUtils/components/Greeting';
  
  describe('react-testing-library', () =&gt; {   
  
      it('renders View Details component', () =&gt; {      
              const component = render(&lt;Greeting /&gt;);
              component.getByText('Hello');
          })
  })
  </code></pre>
  
  <p>My component - greeting.js</p>
  
  <pre class="lang-js prettyprint-override"><code>import React from 'react';
  
  export default function Greeting() {
      return (
          &lt;div&gt;{'Hello'}&lt;/div&gt;
      );
  }
  </code></pre>
  
  <p>cypress\support\index.js </p>
  
  <pre class="lang-js prettyprint-override"><code>import './commands';
  import '@cypress/code-coverage/support';
  </code></pre>
  
  <p>cypress\plugins\index.js</p>
  
  <pre class="lang-js prettyprint-override"><code>
  const webpack = require('@cypress/webpack-preprocessor')
  const webpackOptions = {
    module: {
      rules: [
        {
          test: /\.(js|jsx|mjs)$/,
          loader: 'babel-loader',
          options: {
            presets: ['@babel/preset-env', '@babel/preset-react'],
            plugins: ['@babel/plugin-proposal-class-properties', 'istanbul'],
          },
        }
      ]
    }
  }
  
  const options = {
    // send in the options from your webpack.config.js, so it works the same
    // as your app's code
    webpackOptions,
    watchOptions: {}
  }
  
  module.exports = on =&gt; {
    on('file:preprocessor', webpack(options))
    on('task', require('@cypress/code-coverage/task'))
  
  }
  </code></pre>
  
  <p>Below is the error that I get on the console</p>
  
  <pre><code>react-testing-library
      √ renders View Details component (68ms)
      1) "after each" hook for "renders View Details component"
  
  
    1 passing (7s)
    1 failing
  
    1) react-testing-library "after each" hook for "renders View Details component":
       Error: Cypress command timeout of '4000ms' exceeded.
  
  Because this error occurred during a 'after each' hook we are skipping all of the remaining tests.
        at http://localhost:4444/__cypress/runner/cypress_runner.js:82978:25
  </code></pre>
  
  <p>Because of this the tests fail. Any suggestions as to why this error could be happening would greatly help.</p>
  
  <p>Thanks in advance!</p>