title: Why can't get the global variable which was set in globalSetup in test code?
body: <p>I use Jest to do unit test in node.<br>
  And I use the new feature <a href="https://facebook.github.io/jest/docs/en/configuration.html#globalsetup-string" rel="noreferrer">globalSetup</a> which come in Jest v22.<br>
  I have defined a global variable in <a href="https://facebook.github.io/jest/docs/en/configuration.html#globalsetup-string" rel="noreferrer">globalSetup</a>.<br>
  But I can't get it in the test code. Console log is undefined.<br>
  Anyone in this question?<br>
  Thanks.</p>
  
  <p>Jest version: 22.0.0<br>
  node version: 8.9.0<br>
  yarn version: 1.3.2<br>
  OS: mac High Sierra 10.13.2  </p>
  
  <p>The code as follow: </p>
  
  <pre><code>// package.json
  {
    "jest": {
      "globalSetup": "&lt;rootDir&gt;/src/globalSetupTest.js"
    }
  }
  
  // globalSetupTest.js
  module.exports = async function() {
    global.foo = 'foo';
    console.log(`global setup: ${global.foo}`);
  };
  
  // App.test.js
  describe('APP test', () =&gt; {
    it('renders without crashing', () =&gt; {
      console.log({ foo: global.foo });
    });
  });
  
  // test result
  yarn run v1.3.2
  $ node scripts/test.js --env=node --colors
  global setup: foo
   PASS  src/App.test.js
    APP test
      ✓ renders without crashing (5ms)
  
    console.log src/App.test.js:3
      { foo: undefined }
  
  Test Suites: 1 passed, 1 total
  Tests:       1 passed, 1 total
  Snapshots:   0 total
  Time:        0.354s, estimated 1s
  Ran all test suites.
  </code></pre>