kitchensink
Version:
Dispatch's awesome components and style guide
21 lines (13 loc) • 491 B
Markdown
Returns a wrapper with the direct parent of the node in the current wrapper.
`ShallowWrapper`: A new wrapper that wraps the resulting nodes.
```jsx
const wrapper = shallow(<ToDoList />);
expect(wrapper.find('ul').parent().is('div')).to.equal(true);
```
- [`.parents() => ShallowWrapper`](parents.md)
- [`.children() => ShallowWrapper`](children.md)
- [`.closest(selector) => ShallowWrapper`](closest.md)