title: Jest Enzyme test a React component that returns null in render method
body: <p>I have a component that returns null in render under certain conditions:</p>
  
  <pre><code>render() {
    if (this.props.isHidden) {
        return null;
    }
  
    return &lt;div&gt;test&lt;/div&gt;;
  }
  </code></pre>
  
  <p>I want to check if the component is null when isHidden is true with jest and enzyme:</p>
  
  <pre><code>describe('myComp', () =&gt; {
      it('should not render if isHidden is true', () =&gt; {
          const comp = shallow(&lt;myComp isHidden={true} /&gt;);
          expect(comp.children().length).toBe(0);
      });
  });
  </code></pre>
  
  <p>This works but is there a more idiomatic way to write this test ? Testing for components that render as null is quite a common scenario.</p>