title: expect(...).toBeInTheDocument is not a function after setting up
body: <p>I have <code>'@testing-library/jest-dom'</code> installed so it should be there. Also have the below imports, anything wrong with my config?</p>
  <pre><code>TypeError: expect(...).toBeInTheDocument is not a function
  
        52 |     renderIt(onSubmit);
        53 |
      &gt; 54 |     expect(screen.getByText(/alberta/i)).toBeInTheDocument();
  </code></pre>
  <p>My test:</p>
  <pre class="lang-js prettyprint-override"><code>import { render, screen } from '@testing-library/react';
  import { Formik, Form } from 'formik';
  
  import { Select } from '.';
  
  const options = [
    'Alberta',
    'British Columbia',
    'Manitoba',
    'New Brunswick',
    'Newfoundland &amp; Labrador',
    'Northwest Territories',
    'Nova Scotia',
    'Nunavut',
    'Ontario',
    'Prince Edward Island',
    'Quebec',
    'Saskatchewan',
    'Yukon',
  ];
  
  const renderIt = (onSubmit: () =&gt; void) =&gt; render(
    &lt;Formik
      initialValues={{ province: '' }}
      onSubmit={onSubmit}
    &gt;
      &lt;Form&gt;
        &lt;Select name=&quot;province&quot; options={options} /&gt;
      &lt;/Form&gt;
    &lt;/Formik&gt;,
  );
  
  describe('Select component', () =&gt; {
    test('It renders', () =&gt; {
      const onSubmit = jest.fn();
      renderIt(onSubmit);
  
      expect(screen.getByText(/alberta/i)).toBeInTheDocument();
    });
  });
  </code></pre>
  <p>My <code>src/setupTests.ts</code> file:</p>
  <pre class="lang-js prettyprint-override"><code>// jest-dom adds custom jest matchers for asserting on DOM nodes.
  // allows you to do things like:
  // expect(element).toHaveTextContent(/react/i)
  // learn more: https://github.com/testing-library/jest-dom
  import '@testing-library/jest-dom';
  import '@testing-library/jest-dom/extend-expect';
  </code></pre>
  <p><code>package.json</code>:</p>
  <pre class="lang-json prettyprint-override"><code>  &quot;devDependencies&quot;: {
      &quot;@testing-library/dom&quot;: &quot;8.11.3&quot;,
      &quot;@testing-library/jest-dom&quot;: &quot;5.16.2&quot;,
      &quot;@testing-library/react&quot;: &quot;^13.0.0-alpha.6&quot;,
      &quot;@testing-library/react-hooks&quot;: &quot;7.0.2&quot;,
      &quot;@testing-library/user-event&quot;: &quot;13.5.0&quot;,
      &quot;@types/jest&quot;: &quot;27.4.1&quot;,
      &quot;jest&quot;: &quot;27.5.1&quot;,
      &quot;ts-jest&quot;: &quot;27.1.3&quot;,
      &quot;typescript&quot;: &quot;4.6.2&quot;
    },
  </code></pre>
  <p><code>jest.config.js</code>:</p>
  <pre class="lang-js prettyprint-override"><code>module.exports = {
    testEnvironment: 'jsdom',
    preset: 'ts-jest',
    moduleNameMapper: {
      '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
        '&lt;rootDir&gt;/__mocks__/fileMock.js',
      '\\.(css|less)$': 'identity-obj-proxy',
    },
  };
  </code></pre>