Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The calender component should support for testing purpose #207

Open
ishaklumimpah opened this issue Jan 6, 2023 · 0 comments
Open

The calender component should support for testing purpose #207

ishaklumimpah opened this issue Jan 6, 2023 · 0 comments

Comments

@ishaklumimpah
Copy link

ishaklumimpah commented Jan 6, 2023

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 ishaklumimpah changed the title The calender should support for testing and environment The calender component should support for testing purpose Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant