I have a component SampleComponent
that mounts another \"connected component\" (i.e. container
). When I try to test SampleComponent
by
What I essentially did was bring in my redux
store (and Provider
) and wrapped it in a utility component as follows:
export const CustomProvider = ({ children }) => {
return (
{children}
);
};
then, I mount
the SampleComponent
and run tests against it:
it('contains Component', () => {
const wrapper = mount(
);
expect(wrapper.find(ChildComponent)).to.have.length(1);
});