Returns a CheerioWrapper around the rendered HTML of the current node's subtree.
Note: can only be called on a wrapper of a single node.
String
: The resulting HTML string
class Foo extends React.Component {
render() {
return (<div className="in-foo" />);
}
}
class Bar extends React.Component {
render() {
return (
<div className="in-bar">
<Foo />
</div>
);
}
}
const wrapper = mount(<Bar />);
expect(wrapper.find(Foo).render().find('.in-foo')).to.have.length(1);