title: Jest ioredis mock - Bind mock to module
body: <p>In typescript, i have the following instantion of IoRedis.</p>
  <pre><code>import IoRedis from &quot;ioredis&quot;;
  
  const redis = new IoRedis({
      ...
  });
  </code></pre>
  <p>While mocking in the test classes the following way. Decided to go with <code>ioredis-mock</code>, to solve this problem.</p>
  <pre><code>var IoRedis = require('ioredis-mock');
  var ioRedis = new IoRedis({
      data: {
          ...
      },
  });
  jest.mock('ioredis', ioRedis);
  </code></pre>
  <p>Which results in an error.</p>
  <pre><code>TypeError: this._mockFactories.get(...) is not a function
  </code></pre>
  <p>I have tried alternative calls to mock <code>ioredis</code>, but have a hard time binding the test version of the mock to the one being resolved in my code. Mainly i think the <code>new IoRedis</code> is the culprit but my <code>javascript</code> experience is not sufficient to know which way to mock an import/require followed by an <code>new</code> keyword.</p>