title: Timeout - Async call back not invoked when using jest.useFakeTimers('modern') and jest.setSystemTime()
body: <p>I am trying to mock today's date using jests <a href="https://jestjs.io/docs/en/jest-object#jestusefaketimersimplementation-modern--legacy" rel="nofollow noreferrer">timing functions</a>.</p>
  <p>Previously, I was mocking out <code>dayjs</code> with the following mock:</p>
  <pre><code>jest.mock('dayjs', () =&gt; {
    const mockDayjs = (date = 'Fri Sep 25 2020'): dayjs.Dayjs =&gt; jest.requireActual('dayjs')(date);
    return mockDayjs;
  });
  </code></pre>
  <p>It was suggested that I change this to use the out of the box jest functions as follows:</p>
  <pre><code>  beforeAll(() =&gt; {
      jest.useFakeTimers('modern');
      jest.setSystemTime(new Date('Fri Sep 25 2020'));
    });
  
    afterAll(() =&gt; {
      jest.useRealTimers();
    });
  
  </code></pre>
  <p>This worked for one unit test, but failed for another test with the following error:</p>
  <pre><code>● server: custom reports › post - success
  
      : Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout.Error:
  </code></pre>
  <p>The only main difference between the two tests is that the failing test is asynchronous. Wondering if I am missing something here. Thanks!</p>