react-flatpickr
react-flatpickr copied to clipboard
The calender component should support for testing purpose
There is a way to insert an attribute like data-testid
in to the calender element ? it's seems like no way to add this attribute, it's make the callender hard for testing purpose.
Also how to mock the flatpickr
modules? anyone has experience about testing flatpickr component ? i tried to mock the date system using jest.useFakeTimers().setSystemTime(new Date('2020-02-19'))
, but looks like the calender component still render the initial date using current date.