title: Why is setTimeout not pausing the appropriate milliseconds in my jest tests?
body: <p>I'm playing around with the jest documentation on timer mocks to better understand how they work. When I run the below code, why are the setTimeout's not pausing? When I run this test, it immediately gives me test results even when I had set those gigantic millisecond values. For example 'b' prints immediately even when 500000000000 milliseconds has not passed.</p>
  <p>timerGame-test.js</p>
  <pre class="lang-js prettyprint-override"><code>test('calls the callback after 1 second', () =&gt; {
    const timerGame = require('../timerGame');
    const callback = jest.fn();
    timerGame(callback);
  
    // At this point in time, the callback should not have been called yet
   expect(callback).not.toBeCalled();
  console.log('a ');
    // Fast-forward until all timers have been executed
    setTimeout(
        console.log('b'), 500000000000);
    
    // Now our callback should have been called!
   setTimeout(expect(callback).toBeCalled(),7000000);
    
  });
  </code></pre>
  <p>timerGame.js</p>
  <pre class="lang-js prettyprint-override"><code>// timerGame.js
  'use strict';
  
  function timerGame(callback) {
    console.log('Ready....go!');
    
    
    setTimeout(() =&gt; {
      console.log(&quot;Time's up -- stop!&quot;);
      callback &amp;&amp; callback();
    }, 10000000);
  }
  
  module.exports = timerGame;
  </code></pre>