Testing component life cycle methods, like componentDidMount?
- use
mountand providestore
Testing state / props / clicks?
- use
shallow
Testing nested child components?
- use
mount
Checkboxes
wrapper.find('input').simulate('change', { target: { checked: false } });
onBlur
wrapper.find('input').simulate('blur', { target: { value: '123' } });
wrapper.find('select').simulate('change', { target: { value: 123 } });
- Using a connected component will result in functions passed in as props (eg stubs) to NOT be respected