jkbrzt / rrule

JavaScript library for working with recurrence rules for calendar dates as defined in the iCalendar RFC and more.
https://jkbrzt.github.io/rrule
Other
3.29k stars 514 forks source link

fix: Support Jest mocked dates #526

Open vbudovski opened 2 years ago

vbudovski commented 2 years ago

Jest provides two different implementations of fake timers - legacy and modern. The legacy implementation works with RRule, while the modern one does not, as it uses a strict instance check. Compare the toString result of the object if the value is not a Date instance.


Thanks for contributing to rrule!

To submit a pull request, please verify that you have done the following:

davidgoli commented 1 year ago

Please resolve the conflicts and I'll merge