.findWhere(fn) => ShallowWrapper
Finds every node in the render tree that returns true for the provided predicate function.
Argumentspredicate
(ShallowWrapper => Boolean
): A predicate function called with the passed in wrapped nodes.ShallowWrapper
: A new wrapper that wraps the found nodes.
const wrapper = shallow(<MyComponent />);
const complexComponents = wrapper.findWhere((n) => n.type() !== 'string');
expect(complexComponents).to.have.lengthOf(8);
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