Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Latest commit

 

History

History
23 lines (13 loc) · 522 Bytes

prop.md

File metadata and controls

23 lines (13 loc) · 522 Bytes

.prop(key) => Any

Returns the prop value for the root node of the wrapper with the provided key. It must be a single-node wrapper.

Arguments

  1. key (String): The prop name, that is, this.props[key] or props[key] for the root node of the wrapper.

Example

const wrapper = mount(<MyComponent foo={10} />);
expect(wrapper.prop('foo')).to.equal(10);

Related Methods