title: React Testing not render react-redux
body: <p>I want to render my homepage but I am getting an error.</p>
  <p>My mistake I wonder where what I do I can render my home page.</p>
  <p>home / index.test.tsx</p>
  <pre><code>import { render, screen } from '@testing-library/react';
  import { MemoryRouter } from 'react-router-dom';
  import userEvent from '@testing-library/user-event';
  import Home from './index';
  import { Provider } from 'react-redux';
  import { store } from 'index';
  
  describe('home test', () =&gt; {
    const setup = () =&gt;
      render(
        &lt;Provider store={store}&gt;
          &lt;MemoryRouter&gt;
            &lt;Home /&gt;
          &lt;/MemoryRouter&gt;
        &lt;/Provider&gt;
      );
    it('succesfully renders data', async () =&gt; {
      setup();
      const searchInput = await screen.findByTestId('homeSearchInput');
      userEvent.type(searchInput, 'Handcrafted Trees Mug');
      const product = await screen.findAllByTestId('product');
      expect(product[0]).toHaveTextContent('Handcrafted Trees Mug');
    });
  });
  </code></pre>
  <p>index.tsx</p>
  <pre><code>export const store = createStore(rootReducer, applyMiddleware(thunk));
  
  ReactDOM.render(
    &lt;React.StrictMode&gt;
      &lt;Provider store={store}&gt;
        &lt;App /&gt;
      &lt;/Provider&gt;
    &lt;/React.StrictMode&gt;,
    document.getElementById('root')
  );
  </code></pre>
  <p>The error I get is this :
  <a href="https://i.stack.imgur.com/hGn2X.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hGn2X.png" alt="enter image description here" /></a></p>