title: How to test if React component is returning null or its children using React Testing Library?
body: <p>I have a React component that returns its <code>children</code> to be rendered by React if the prop <code>isTrue</code> is truth-y. If its prop <code>isTrue</code> is false-y, then the component returns <code>null</code>, and React doesn't render anything.</p>
  <p>I need to test it as a component, mount it, pass the prop, and test if it's children is getting rendered when the prop <code>isTrue</code> is truth-y, or we are getting <code>null</code> if <code>isTrue</code> is false-y.</p>
  <p>Here is my component:</p>
  <pre><code>const RenderIf = ({ isTrue, children }) =&gt; {
      if (isTrue) {
          return children;
      }
      return null;
  }
  export default RenderIf
  </code></pre>