title: Jest testing error Received: serializes to the same string
body: <p>i try to play with jest to learn how to test my react application.<br/>
  I have create a button that will only embed some element to keep the same style constantly.</p>
  <p>Here is the code of my button :</p>
  <pre><code>export function searchBtn(triggerSearch) {
    return (
      &lt;div className=&quot;d-flex justify-content-center my-3&quot;&gt;
        &lt;input
          type=&quot;submit&quot;
          className=&quot;btn btn-primary w-25&quot;
          value=&quot;Search&quot;
          onClick={(e) =&gt; {
            e.preventDefault();
            triggerSearch();
          }}
        &gt;&lt;/input&gt;
      &lt;/div&gt;
    );
  }
  </code></pre>
  <p>Here is my test :</p>
  <pre><code>const { searchBtn } = require(&quot;./SearchBtn&quot;);
  
  test(&quot;going to try the btn&quot;, () =&gt; {
    
    function triggerSearch() {}
  
    expect(searchBtn(triggerSearch)).toEqual(
      &lt;div className=&quot;d-flex justify-content-center my-3&quot;&gt;
        &lt;input
          type=&quot;submit&quot;
          className=&quot;btn btn-primary w-25&quot;
          value=&quot;Search&quot;
          onClick={(e) =&gt; {
            e.preventDefault();
            triggerSearch();
          }}
        &gt;&lt;/input&gt;
      &lt;/div&gt;
    );
  });
  </code></pre>
  <p>I don't know why i always get this error : <br/>
  <strong>Received: serializes to the same string</strong></p>
  <p>Thanks you in advance</p>