I am getting this error:
Error: ShallowWrapper::state() can only be called on the root
Here is my test:
it('default "errors" state is an empty object', () => {
const router = {'react-router': {}};
const wrapper = shallow(<IntlProvider><SignUpForm router={router} /></IntlProvider>);
expect(wrapper.find(SignUpForm).state('errors')).to.equal({});
});
Would anyone be able to tell me how I can access/test the state of the SignUpForm component?