title: Jest unit test: setTimeout not firing in async test
body: <p>I'm trying to understand how asynchronous testing works in Jest. </p>
  
  <p>What I'm trying to do is similar to an example from the Jest documentation. This works fine ..</p>
  
  <pre><code>function doAsync(c) {
    c(true)
  }
  
  test('doAsync calls both callbacks', () =&gt; {
  
    expect.assertions(2);
  
    function callback1(data) {
      expect(data).toBeTruthy();
    }
  
    function callback2(data) {
      expect(data).toBeTruthy();
    }
  
    doAsync(callback1);
    doAsync(callback2);
  });
  </code></pre>
  
  <p>But I want to delay the callback invocations so I tried this ....</p>
  
  <pre><code> function doAsync(c) {
      setTimeout(() =&gt; {
        console.log('timeout fired')
        c(true)
      }, 1000)
    }
  </code></pre>
  
  <p>but the test fails with the message <code>Expected two assertions to be called but received zero assertion calls.</code>. </p>
  
  <p>The log message 'timeout fired' doesn't appear in the console.</p>
  
  <p>Please can someone explain why it fails?</p>