Returns the wrapper's underlying node.
If the current wrapper is wrapping the root component, returns the root component's latest render output.
ReactElement
: The retrieved node.
const element = (
<div>
<span />
<span />
</div>
);
class MyComponent extends React.Component {
render() {
return element;
}
}
const wrapper = shallow(<MyComponent />);
expect(wrapper.getNode()).to.equal(element);