.getElement() => ReactElement
Returns the wrapped ReactElement.
If the current wrapper is wrapping the root component, returns the root component's latest render output.
ReturnsReactElement
: The retrieved ReactElement.
const element = (
<div>
<span />
<span />
</div>
);
function MyComponent() {
return element;
}
const wrapper = shallow(<MyComponent />);
expect(wrapper.getElement()).to.equal(element);
Related Methods
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4