title: Jest: Timer and Promise don't work well. (setTimeout and async function)
body: <p>Any ideas on this code</p>
  
  <pre><code>jest.useFakeTimers() 
  
  it('simpleTimer', async () =&gt; {
    async function simpleTimer(callback) {
      await callback()    // LINE-A without await here, test works as expected.
      setTimeout(() =&gt; {
        simpleTimer(callback)
      }, 1000)
    }
  
    const callback = jest.fn()
    await simpleTimer(callback)
    jest.advanceTimersByTime(8000)
    expect(callback).toHaveBeenCalledTimes(9)
  }
  </code></pre>
  
  <p>```</p>
  
  <p>Failed with</p>
  
  <pre><code>Expected mock function to have been called nine times, but it was called two times.
  </code></pre>
  
  <p>However, If I remove <code>await</code> from LINE-A, the test passes. </p>
  
  <p>Does Promise and Timer not work well?</p>
  
  <p>I think the reason maybe jest is waiting for second promise to resolve.</p>