title: How to write test case coverage in Jest and Enzyme for indexOf used inside React Component
body: <p>I am writing test case for my react component in Jest and Enzyme. I have a component where I have used indexOf method. Now when I am running Jest, it showing that test is uncovered for that particular line.</p>
  
  <p><a href="https://i.stack.imgur.com/636te.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/636te.png" alt="enter image description here"></a></p>
  
  <p>Coverage Report:</p>
  
  <p><a href="https://i.stack.imgur.com/7j2zj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7j2zj.png" alt="enter image description here"></a></p>