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/findWhere.html below:

findWhere(predicate) ยท Enzyme

.findWhere(fn) => ShallowWrapper

Finds every node in the render tree that returns true for the provided predicate function.

Arguments
  1. predicate (ShallowWrapper => Boolean): A predicate function called with the passed in wrapped nodes.
Returns

ShallowWrapper: A new wrapper that wraps the found nodes.

Example
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