title: How do I run some config before every Jest test run
body: <p>I'm writing tests for a React application which makes use of Fluxxor to provide an event dispatcher. Making that work requires telling Jest not to mock a few modules which are used internally, and are provided by Node itself.</p>
  
  <p>That means I can't just add them to the <code>unmockedModulePathPatterns</code> config key, and instead have to use some code like this:</p>
  
  <pre><code>[ 'util', 'events' ].forEach(function (module) {
    jest.setMock(module, require.requireActual(module));
  });
  </code></pre>
  
  <p>However, I can't find anywhere useful to put it. I've got a <code>setupEnvScriptFile</code> which sets up a few globals that I use in almost all my tests, but the <code>jest</code> object doesn't seem to be available in that context, so I can't just set the mocks there.</p>
  
  <p>As a hacky stopgap measure I've wrapped the code above in a function which I call at the beginning of any <code>describe</code> blocks testing Fluxxor stores, but its far from ideal.</p>