title: "Nothing was returned from render"
body: <p>I am trying to test a parent component and want to mock the child by doing the following.
  I have a <code>__mocks__</code> folder which contains the mock of my child component:</p>
  <pre class="lang-js prettyprint-override"><code>//ChildComponent.tsx
  import React from 'react'
  const ChildComponent = () =&gt; {
    return &lt;div&gt;ChildComponent Mock&lt;/div&gt;
  }
  export default ChildComponent
  </code></pre>
  <p>My test file:</p>
  <pre class="lang-js prettyprint-override"><code>//ParentComponent.test.tsx which will render the child
  import ParentComponent from '@/components/ParentComponent'
  import { render, screen } from '@testing-library/react'
  
  jest.mock('@/components/ChildComponent')
  it('renders correctly', () =&gt; {
    const component = render (
     &lt;ParentComponent /&gt;
    )
  })
  </code></pre>
  <p>The error I receive is: <code>ChildComponent(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.</code></p>
  <p>Has anyone faced the issue yet while testing?</p>