XPath matchers for React elements. It is recommended that you use shallow rendering of components and make your assertion on its output.
jasmine.addMatchers(require("jasmine-xpath-react"));
var element = (
<div>
<ul>
<li>foo</li>
<li>bar</li>
</ul>
</div>
);
expect(element).toHaveXpath(".//li[contains(., 'foo')]");