score:2

Accepted answer

could be something like this. you should test you wrapper to render wrapped component with its props. also test your functions that update state.

const bar = props => <span />
const test = container(bar)
const wrapper = shallow(<test prop1={1} prop2={2}>)

const bar = wrapper.find(bar)
expect(bar).to.have.length(1)
expect(bar.props()).contains({ prop1: 1, prop2: 2})

bar.props().showmodal()
expect(wrapper.state().showmodal).to.be(true)

Related Query

More Query from same tag