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

The calender component should support for testing purpose

Open ishaklumimpah opened this issue 2 years ago • 0 comments

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.

ishaklumimpah avatar Jan 06 '23 12:01 ishaklumimpah