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

filterWhere(predicate) ยท Enzyme

.filterWhere(fn) => ShallowWrapper

Returns a new wrapper with only the nodes of the current wrapper that, when passed into the provided predicate function, return true.

Arguments
  1. predicate (ShallowWrapper => Boolean): A predicate function that is passed a wrapped node.
Returns

ShallowWrapper: A new wrapper that wraps the filtered nodes.

Example
const wrapper = shallow(<MyComponent />);
const complexFoo = wrapper.find('.foo').filterWhere((n) => typeof n.type() !== 'string');
expect(complexFoo).to.have.lengthOf(4);

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