title: How to stop React HTML escaping quotes in test with testRenderer?
body: <p>When I use this test it almost works </p>
  
  <pre><code>it('renders HTML correctly', () =&gt; {
    const result = TestRenderer.create(
    &lt;NavButton step="2" direction='prev' /&gt;)
    expect(result).toEqual('&lt;button className="btn btn-prev" onClick={[Function onClick]} type="button"&gt;Prev&lt;/button&gt;');
  });
  </code></pre>
  
  <p>but I get</p>
  
  <pre><code>Tests.test.js
  FAIL  src/components/NavButton.test.js
  expect(received).toEqual(expected) // deep equality
  Expected: "&lt;button className=\"btn btn-prev\" onClick={[Function onClick]} type=\"button\"&gt;Prev&lt;/button&gt;"
  Received: &lt;button className="btn btn-prev" onClick={[Function onClick]} type="button"&gt;Prev&lt;/button&gt;
  </code></pre>
  
  <p>The problem is that <strong>my</strong> string in the test (not the result string) is having its quotes (") escaped with \"</p>
  
  <p>So the fix is NOT to escape the quotes with a backslash (they are not appearing in the result, they are apeearing in my comparison string) - the problem is to stop their being a backslash in the first place.  Maybe there a method to do this. Or make the result escape them somehow.</p>
  
  <p>I tried switching quote types with double quotes around the outside but then I had a similar problem with inside quotes needing to be escaped</p>