title: Why does jest-dom give the error "TypeError: expect(...).not.toBeVisible is not a function" when I use it
body: <p>In relation to a previous question - <a href="https://stackoverflow.com/questions/62406862/how-can-enzyme-check-for-component-visibility">How can Enzyme check for component visibility?</a> I tried using <code>jest-dom</code> to specifically use their <code>toBeVisible</code> function. </p>
  
  <p>Despite following the documentation I cannot get it to work in my test and get the error</p>
  
  <p><code>"TypeError: expect(...).not.toBeVisible is not a function"</code></p>
  
  <p>Fully reproduced in CodeSandbox here <a href="https://codesandbox.io/s/check-checkbox-hidden-with-jsdom-xgijx?fontsize=14&amp;hidenavigation=1&amp;theme=dark" rel="noreferrer"><img src="https://codesandbox.io/static/img/play-codesandbox.svg" alt="Edit check-checkbox-hidden-with-jsdom"></a></p>
  
  <pre><code>import Enzyme, { mount } from "enzyme";
  import Adapter from "enzyme-adapter-react-16";
  import React from "react";
  import MyCheckbox from "./MyCheckbox";
  import MyCheckboxesInUse from "./MyCheckboxesInUse";
  
  
  Enzyme.configure({ adapter: new Adapter() });
  
  test("Check that one checkbox is hidden and the other is visible", () =&gt; {
    const wrapper = mount(&lt;MyCheckboxesInUse /&gt;);
  
    const checkboxes = wrapper.find(MyCheckbox);
    expect(checkboxes).toHaveLength(2);
  
    //HOW DO I CHECK THAT ONE IS VISIBLE AND THE OTHER IS NOT ?
    expect(checkboxes.get(0)).not.toBeVisible();
    expect(checkboxes.get(1)).toBeVisible();
  });
  
  </code></pre>