title: Jest manual mocks does not use mock file in CRA
body: <p>I have a CRA app and am trying to the use the <a href="https://jestjs.io/docs/en/manual-mocks" rel="noreferrer">manual mocks</a> feature of Jest, but my manual mocks does not seem to be applied.</p>
  <p>I use a base url of <code>src</code> (by setting it in <code>tsconfig.json</code>). Simplified, I have  and have a file structure of</p>
  <pre><code>src/
  |- components/
  |-- Foo/
  |--- index.js
  |--- Foo.jsx
  |- App.js
  |- App.test.js
  </code></pre>
  <p>where <code>App.js</code> uses <code>import Foo from &quot;components/Foo&quot;</code>. In <code>App.test.js</code> I want <code>Foo</code> to be mocked (it's computationally heavy and tested in unit tests). So in my test I added <code>jest.mock(&quot;components/Foo&quot;)</code> and in my desperation added several <code>__mocks__</code> folders like</p>
  <pre><code>__mocks__
  |- components\
  |-- Foo.jsx
  src/
  |- __mocks__/
  |-- components/
  |--- Foo.jsx
  |- components/
  |-- Foo/
  |--- __mocks__
  |---- Foo.js
  |--- index.js
  |--- Foo.jsx
  |- App.js
  |- App.test.js
  </code></pre>
  <p>where each manual mock contains</p>
  <pre><code>console.log(&quot;Mock imported&quot;);
  
  export default function MyMock(){
    console.log(&quot;Mock used&quot;);
    return &lt;p /&gt;;
  }
  </code></pre>
  <p>However, when running the tests no there are no console printouts from the mock and although <code>Foo</code> is assigned an empty mock, it does not use the intended manual mock.</p>
  <p>What have I done wrong?</p>