title: Best way to override auto-mocks?
body: <p>I need all module functions to be auto-mocked except those I want to mock manually.
  I'd like to do this using factory parameter of jest.mock() by analogy with an example from jest docs (<a href="https://jestjs.io/docs/jest-object#jestrequireactualmodulename" rel="nofollow noreferrer">https://jestjs.io/docs/jest-object#jestrequireactualmodulename</a>), something like this:</p>
  <pre><code>jest.mock('someModule', () =&gt; ({
    ...jest.requireMock('someModule'), // This doesn't work :(
    someFunction: jest.fn(() =&gt; 'someValue')
  }));
  </code></pre>
  <p>I expect jest.requireMock(moduleName) to do the trick like jest.requireActual(moduleName) does, but end up with
  <code>RangeError: Maximum call stack size exceeded</code></p>
  <p>Is it possible to achieve my goal in such a manner?
  If no, what is the best practice of doing this?</p>
  <p>jest: 24.9.0, ts-jest: 26.4.1</p>