title: Jest module mock - doMock doesn't work as intended
body: <p>I have a module that exports an object, let's call it <code>myObject</code>.</p>
  
  <p>This export is used somewhere on the call-stack of the test case, but not <em>directly</em> in the test-case. </p>
  
  <p>I would like to mock different values for this export depending on test cases.
  Currently, the mock works if I have it top-level and use <code>jest.mock</code>:</p>
  
  <p><code>jest.mock('../myModulePath', () =&gt; ({myObject: {mocked: 'valueHere'}))</code></p>
  
  <p>However, using <code>jest.doMock</code> instead, while making sure to reset modules before each test with 
  <code>beforeEach(() =&gt; jest.resetModules())</code> doesn't work. </p>
  
  <p>I've tried using a <code>require</code> right after my <code>doMock</code> call but as expected it didn't work, as I'm not using the module directly in my tests.</p>
  
  <p>Has anyone managed to achieve this? </p>