title: expect(...).toHaveAttribute is not a function despite properly extending it
body: <p>I have my test setup using <code>jest</code> and <code>detox</code> (@e2e)</p>
  
  <p>Issue is, despite seemingly properly importing <code>@testing-lib/jest-dom</code>, I can't seem to use the <code>toHaveAttribute()</code> matcher as I should be able to.</p>
  
  <hr>
  
  <p><strong>Inside my <code>spec.js</code> file:</strong></p>
  
  <pre><code>import { toHaveAttribute } from '@testing-library/jest-dom/matchers'
  import '@testing-library/jest-dom/extend-expect'
  
  expect.extend({
    toHaveAttribute,
  })
  
  // ... tests here
  </code></pre>
  
  <p>However, when running my tests, I get the following error:</p>
  
  <blockquote>
    <p>TypeError: expect(...).toHaveAttribute is not a function</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/5MNTo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5MNTo.png" alt="enter image description here"></a></p>
  
  <ul>
  <li>As <a href="https://github.com/testing-library/jest-dom#usage" rel="nofollow noreferrer">you can see @ docs I should be setting up my <code>expect</code> properly.</a>. So I'm really confused as to why I'm getting this error.  </li>
  <li>I found a <a href="https://github.com/testing-library/react-testing-library/issues/379" rel="nofollow noreferrer">similar
  issue</a>,
  but as you can see, I'm properly importing the <code>extend-expect</code> here.</li>
  </ul>