Question. How to make DatePicker render with Enzyme Mount?
Expected behavior
DatePicker component should render using Enzyme Mount.
Actual behavior
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Steps to reproduce
react-datepicker - version 2.0.0 enzyme - version 3.3.0
import {mount, shallow} from 'enzyme'; import DatePicker from "react-datepicker" mount(<DatePicker selected={new Date()} onChange={jest.fn()}/>)
Enzyme shallow works, but I am having this issue with mount. Should this work?
Thanks Shamus
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.