Component to be tested. this.props.children have child components of example.js
class Example extends component {
constructor(){
super(props);
this.state={};
}
render() {
<div>{this.props.children}</div>
}
}
test case
it("should render Example with children", () => {
const wrapper = shallow(<Example {...props} />);
expect(wrapper.find("div").text()).toBe(""); //
});
how to test the child components passed ?
Thanks.