score:4

Accepted answer
const wrapper = mount(<mycomponent foo={10} />);
expect(wrapper.props().children).to.equal(10);

edit:

and like @must keem pointed out, this works also:

const wrapper = mount(<mycomponent foo={10} />);
expect(wrapper.instance().props.foo).to.equal(10);

Related Query

More Query from same tag