Is there a way to render plain HTML from react components without the markup?

667 Views Asked by At

I'm writing unit tests for some React components using the handy renderIntoDocument() method, but when I look at the DOM's innerHTML, I'm getting the following:

<h3>
  <!-- react-text: 17 -->Start with <!-- /react-text -->
  <span class="theme-secondary-color"><!-- react-text: 19 -->5<!-- /react-text -->
  <!-- react-text: 20 --> Plans<!-- /react-text --></span>
</h3>

When I really would like to parse:

<h3>
  Start with <span class="theme-secondary-color">5 Plans
  </span>
</h3>

I realize that React needs the markup to do it's thing, but is there a utility to strip out the React markup in order to write tests that are easier to read?

Any help would be appreciated!

0

There are 0 best solutions below