title: How to expect a getByText to be false in react testing library?
body: <p>I am using Jest and the React testing library to test a component.</p>
  <p>I am trying to test a modal and I have a weird issue that I am facing. When I try to get by text the &quot;Modal Title&quot; before firing the event I get en error because the &quot;Modal Title&quot; does not exist in the rendered document. If I try to look for the &quot;Modal Title&quot; after firing the &quot;Open Modal&quot; button it works. But I would like to test as well that the modal does not exist before the triger event. So I decided to expect the &quot;Modal Title&quot; to be false but that doesn't work. So far I have tried the toBe(false), toBeFalsy(), toBeNull() and even tried to see if the lenght is 0 but nothing of the mentioned work. How can I solve this.</p>
  <pre><code>it('Test Modal', () =&gt; {
      
      const { getByText } = render(&lt;TestApp /&gt;);
     
      expect(getByText('Modal Title')).toBe(false);
      fireEvent.click(getByText('Open Modal'));
      expect(getByText('Modal Title')).toBeTruthy();
  })
  </code></pre>