react-datepicker icon indicating copy to clipboard operation
react-datepicker copied to clipboard

Question. How to make DatePicker render with Enzyme Mount?

Open shamusharkin opened this issue 7 years ago • 1 comments

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

shamusharkin avatar Jan 25 '19 16:01 shamusharkin

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.

stale[bot] avatar Aug 30 '19 11:08 stale[bot]