title: How to test conditional rendering of components using Jest and Enzyme
body: <p>I have a conditional rendering block in my React component which is defined as:</p>
  
  <pre><code> {(props.email.primary.isPending) ?
            &lt;PendingComponent emailAddress={props.email.primary.pendingEmail} /&gt;
            :
            &lt;SecondaryEmailContact
              state={props.email.secondary}
              retrieveInputData={props.retrieveInputData}
              handleSecondaryEmailToggle={props.handleSecondaryEmailToggle}
              handleDelete={props.handleDelete}
              handleSubmitContact={props.handleSubmitContact}
              refs={props.refs}
            /&gt;
          }
  </code></pre>
  
  <p>I have written a test case as below:</p>
  
  <pre><code>it('renders the EditEmailContact component', () =&gt; {
          wrapper=mount(&lt;EditEmailContact 
            email={emailState}
            handleSecondaryEmailToggle={handleSecondaryEmailToggleFn}
            retrieveInputData={retrieveInputDataFn}
            handleDelete={handleDeleteFn}
            handleSubmitContact={handleSubmitContactFn} /&gt;);
      });
    });
  </code></pre>
  
  <p>So, in my test result it shows the line where the statement for conditional rendering is defined is not tested. So, how do I test the conditional rendering?</p>