Skip to content

Latest commit

 

History

History
32 lines (19 loc) · 421 Bytes

getNodes.md

File metadata and controls

32 lines (19 loc) · 421 Bytes

.getNodes() => Array<ReactElement>

Returns the wrapper's underlying nodes.

Returns

Array<ReactElement>: The retrieved nodes.

Examples

function Test() {
  return (
    <div>
      <span />
      <span />
    </div>
  );
}

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

Related Methods