Skip to content

Latest commit

 

History

History
34 lines (21 loc) · 469 Bytes

getNodes.md

File metadata and controls

34 lines (21 loc) · 469 Bytes

.getNodes() => Array<ReactElement>

Returns the wrapper's underlying nodes.

Returns

Array<ReactElement>: The retrieved nodes.

Examples

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

const wrapper = mount(<Test />);
expect(wrapper.find('span').getNodes()).to.have.lengthOf(2);

Related Methods