Skip to content

Latest commit

 

History

History
34 lines (21 loc) · 453 Bytes

getNode.md

File metadata and controls

34 lines (21 loc) · 453 Bytes

.getNode() => ReactElement

Returns the wrapper's underlying node.

Returns

ReactElement: The retrieved node.

Examples

class Test extends React.Component {
  render() {
    return (
      <div>
        <span />
        <span />
      </div>
    );
  }
}

const wrapper = mount(<Test />);
expect(wrapper.getNode()).to.be.an.instanceof(Test);

Related Methods