title: How to write a unit test case for a search in the react
body: <p>I have a component which has an input box which is like-></p>
  
  <pre><code>class search extends React.Component {
  
      constructor(props) {
          super(props);
          this.staate = {
              search : ''
          }
      }
  
       onInputChnage = (e) =&gt; {
          this.setState({ search: e.target.value });
       }
  
      render() {
  
          const { jobs: { content } } = this.props;
          const { search } = this.state;
          const filteredList = content.filter(job =&gt; (job.jdName &amp;&amp; job.jdName.toLowerCase().includes(search.toLowerCase())) || (job.technology &amp;&amp; job.technology.toLowerCase().includes(search.toLowerCase())));
  
          return (
              &lt;input type="text"
                  id="searchJob"
                  className="form-control-sm border-0 flex-grow-1"
                  value={this.state.search}
                  placeholder="Technology / Job title"
                  onChange={this.onInputChnage}
              /&gt;
              &lt;i className="fa fa-search search-job"&gt;&lt;/i&gt;
          )
      }
  }
  </code></pre>
  
  <p>In this component, Now I have data about jobs which is coming from a reducer .</p>
  
  <pre><code>this.props.jobs = {
      "content": [{
          "id": "5b7d4a566c5fd00507501051",
          "companyId": null,
          "jdName": "Senior/ Lead UI Developer",
          "jobDescription": null,
          "technology": "java"
      },{
          "id": "5b7d4a566c5fd005075011",
          "companyId": null,
          "jdName": "ead UI Developer",
          "jobDescription": null,
          "technology": "angular"
      }]
  }
  </code></pre>
  
  <p>Now, Here I want to test this component's search functionality using the unit test cases. I am using the <code>jest</code>. Now, Can anyone please help me with this? Any hint will be really helpful. Thanks.</p>