Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 525 Bytes

render.md

File metadata and controls

35 lines (24 loc) · 525 Bytes

.render() => CheerioWrapper

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.

Returns

String: The resulting HTML string

Examples

function Foo() {
  return (<div className="in-foo" />);
}
function Bar() {
  return (
    <div className="in-bar">
      <Foo />
    </div>
  );
}
const wrapper = mount(<Bar />);
expect(wrapper.find(Foo).render().find('.in-foo')).to.have.length(1);