jest-date-mock
jest-date-mock copied to clipboard
Missing comparison section in README
Hello 👋
Could you please add section to README where you provide comparison to jest Fake timers API ?
Thanks 🙏
One is date API, one is timer. Why need a section to compare them?
Both are operating with time and seems the same way.. so I wanted to know why should I use this library over official API 🤷
jest-date-mock
advanceTo(new Date(2018, 5, 27, 0, 0, 0)); // reset to date time.
seems to be same as https://jestjs.io/docs/jest-object#jestsetsystemtimenow-number--date
jest-date-mock
advanceBy(3000); // advance time 3 seconds
seems to be same as https://jestjs.io/docs/jest-object#jestadvancetimersbytimemstorun
Thanks 🙏
Date and timer is not same.
Dateis for calendartimeris for setTimeout or setInterval