Back to Enzyme

`.isEmpty() => Boolean`

docs/api/ReactWrapper/isEmpty.md

2.9.1335 B
Original Source

.isEmpty() => Boolean

Deprecated: Use .exists() instead.

Returns whether or not the wrapper is empty.

Returns

Boolean: whether or not the wrapper is empty.

Example

jsx
const wrapper = mount(<div className="some-class" />);
expect(wrapper.find('.other-class').isEmpty()).to.equal(true);