title: Issues mocking node modules
body: <p>I'm using <a href="https://github.com/visionmedia/superagent" rel="nofollow">superagent</a> to back some XHR services in a react application. I've written a very thin wrapper around superagent to make configuration easier. Attempting to test this thin layer has proven to be quite the headache. </p>
  
  <p>I'm aware that there are <a href="https://github.com/facebook/jest/pull/122" rel="nofollow">issues</a> with jest and node core depdencies and I can get things to work by <code>dontMock</code>ing superagent's dependencies. But i'd much prefer to have jest just mock <code>superagent</code> without blowing up by default.</p>
  
  <p>The result is an extremely verbose test intro or <code>unMockedModulePatterns</code> entry in my package.json, is there a better way?</p>
  
  <pre><code>// my-module.js
  'use strict';
  
  var request = require('superagent');
  
  module.exports = function () {
    return request.get('http://stackoverflow.com/questions/tagged/jestjs');
  };
  </code></pre>
  
  <p>An example test: </p>
  
  <pre><code>// __tests__/my-module-test.js
  'use strict';
  
  jest.dontMock('../');
  // T_T
  jest.dontMock('superagent');
  jest.dontMock('debug');
  jest.dontMock('tty');
  jest.dontMock('util');
  jest.dontMock('stream');
  jest.dontMock('fs');
  jest.dontMock('delayed-stream');
  jest.dontMock('mime');
  jest.dontMock('path');
  
  describe('mymodule', function () {
    var myModule, request;
  
    beforeEach(function () {
      myModule = require('../');
      request = require('superagent');
  
      request.get = jest.genMockFunction(function () {
        return {
          get: jest.genMockFunction()
        }
      })
    });
  
    it('makes an xhr request using superagent', function() {
      var req = myModule();
      expect(request.get).toBeCalledWith('http://stackoverflow.com/questions/tagged/jestjs');
    });
  });
  </code></pre>