title: How to test HTML of a rendered React component?
body: <p><a href="https://github.com/moroshko/react-autosuggest">My React component</a> has a <code>suggestionRenderer</code> property that allows to specify how the component is rendered. For example:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;Autosuggest suggestions={getSuburbs}
               suggestionRenderer={renderLocation} /&gt;
  </code></pre>
  
  <pre class="lang-jsx prettyprint-override"><code>function renderLocation(suggestion, input) {
    return (
      &lt;span&gt;&lt;strong&gt;{suggestion.slice(0, input.length)}&lt;/strong&gt;{suggestion.slice(input.length)}&lt;/span&gt;
    );
  }
  </code></pre>
  
  <p>Now, I'd like to write a jest test to make sure that <code>suggestionRenderer</code> does its job. Inspecting <code>myElement.getDOMNode().innerHTML</code> reveals:</p>
  
  <pre><code>&lt;span data-reactid=".9.1.$suggestion0.0"&gt;&lt;strong data-reactid=".9.1.$suggestion0.0.0"&gt;M&lt;/strong&gt;&lt;span data-reactid=".9.1.$suggestion0.0.1"&gt;ill Park&lt;/span&gt;&lt;/span&gt;
  </code></pre>
  
  <p>which is not particularly useful.</p>
  
  <p>Is there a way to get a clean HTML, without React attributes?</p>