title: Unit testing branch coverage(100%) using @testing-library/react (react-testing-library)
body: <p>How to cover all branches (100%) in unit testing using @testing-library/react (react-testing-library).</p>
  <p>Below are some scenarios</p>
  <ol>
  <li><p>Conditonal Statements</p>
  <pre><code>const num = getNum();
  if(num%2 === 0){
    statements...
  } else {
    statements...
  }
  </code></pre>
  </li>
  </ol>
  <p>How to cover statements in both if and else branch?</p>
  <ol start="2">
  <li><p>Private methods in component</p>
  <pre><code>const onDateSelectorChange = (elem, value) =&gt; {
    statements...
  } 
  </code></pre>
  </li>
  </ol>
  <p>How to cover statements in private method like above, that are created to pass as props to child and
  only triggered from child?</p>