Reputation: 9429
Trying to unit test a redux-form FormSection
component with enzyme shallow, and get the following error
Error: FormSection must be inside a component decorated with reduxForm()
What is the best option to avoid this error?
Upvotes: 0
Views: 453
Reputation: 9429
I was able to get around this error by mocking the reduxForm
in the context as follows:
shallow(<MyComponent {...props} />, { context:{ _reduxForm: {}}});
Upvotes: 3