A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://enzymejs.github.io/enzyme/docs/api/ShallowWrapper/parents.html below:

parents() ยท Enzyme

.parents([selector]) => ShallowWrapper

Returns a wrapper around all of the parents/ancestors of the single node in the wrapper. Does not include the node itself. Optionally, a selector can be provided and it will filter the parents by this selector. It must be a single-node wrapper.

Arguments
  1. selector (EnzymeSelector [optional]): The selector to filter the parents by.
Returns

ShallowWrapper: A new wrapper that wraps the resulting nodes.

Examples
const wrapper = shallow(<ToDoList />);
expect(wrapper.find('ul').parents()).to.have.lengthOf(2);

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