.every(selector) => Boolean
Returns whether or not all of the nodes in the wrapper match the provided selector.
Arguments
selector
(EnzymeSelector
): The selector to match.
Returns
Boolean
: True if every node in the current wrapper matched the provided selector.
Examples
const wrapper = shallow(
<div>
<div className="foo qoo" />
<div className="foo boo" />
<div className="foo hoo" />
</div>
);
expect(wrapper.find('.foo').every('.foo')).to.be.true;
expect(wrapper.find('.foo').every('.qoo')).to.be.false;
expect(wrapper.find('.foo').every('.bar')).to.be.false;