title: Is it necessary to call unmount after each test cases in react testing libarary?
body: <pre><code>describe('&lt;CustomTooltip /&gt;', () =&gt; {
    it('should show tooltip text', async () =&gt; {
      const { container, unmount } = render(&lt;CustomTooltip text='Tooltip Text' /&gt;)
  
      userEvent.hover(container.querySelector('svg'))
      await screen.findByText('Tooltip Text')
  
      screen.debug()
      unmount()  // ?? is it necessary to call unmount after each test cases?
    })
  
    it('check if there is an mounted component', () =&gt; {
      screen.debug()
    })
  })
  </code></pre>
  <p>Is it necessary to call <code>unmount</code> after each test cases? Because I've added useEffect in the <code>CustomTooltip</code> component, and Unmounted is logged before the second test case. And even the second test case <code>screen.debug</code> output is <code>&lt;body /&gt;</code>.</p>
  <pre><code>  useEffect(() =&gt; {
      console.log('Mounted')
      return () =&gt; console.log('Unmounted')
    }, [])
  </code></pre>
  <p>I asked this because i saw a custom implementation for <code>render</code> in test utils to <code>unmount</code> component after each test cases, and I'm curious to know if this is really important.</p>
  <pre><code>let lastMount = null;
  const _render = (...args) =&gt; {
    lastMount = render(...args);
    return lastMount;
  };
  
  
  afterEach(() =&gt; {
    if (lastMount)
      lastMount.unmount();
  
    lastMount = null;
  });
  </code></pre>