sinonjs / fake-timers

Fake setTimeout and friends (collectively known as "timers"). Useful in your JavaScript tests. Extracted from Sinon.JS
BSD 3-Clause "New" or "Revised" License
793 stars 103 forks source link

fix: save methods of children Date instance (#437) #480

Open Oustinger opened 10 months ago

Oustinger commented 10 months ago

Fix issue #437 by creating ClockDate as JS class and extending it from NativeDate

Why I did this way:

But I had some troubles with tests:

fatso83 commented 9 months ago

Oooh, I somehow missed that this was added. Sorry about the late look, but while this is interesting, my head is a bit fried 🤯 This is quite a big change, so I (or someone else with a bigger head) needs to take a new look with a fresh head!

Thanks for providing a fix to something that bugged you a year ago. That's persistence we can appreciate 😄

benjamingr commented 9 months ago

It's a bit scary breaking change, so I think I would like some more 👀 on this before going ahead.

I started reviewing it and came to the "bit scary" conclusion as well.

stale[bot] commented 6 months ago

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.