🚀 feature request
Relevant Package
This feature request is for zone.js
Description
I want to use fake dates in my jest tests (just like jasmine.clock), while using fakeAsync when I'm testing async functions.
A recent addition to jest is the modern fake timers, which uses Sinon's fake timers that allows (among other things) to fake date.now.
Describe the solution you'd like
I think we should write a patch for jest's useFakeTimers, or add the ability to fake the date natively in zone (by exposing FakeDate somehow and manipulating it).
Describe alternatives you've considered
I wrote it in the section above - 2 ways to solve this problem - patch jest's setSystemTime or expose a way to set a fake date manually by zone.js
Thanks!
🚀 feature request
Relevant Package
This feature request is for zone.js
Description
I want to use fake dates in my jest tests (just like
jasmine.clock), while usingfakeAsyncwhen I'm testing async functions.A recent addition to jest is the modern fake timers, which uses Sinon's fake timers that allows (among other things) to fake
date.now.Describe the solution you'd like
I think we should write a patch for jest's
useFakeTimers, or add the ability to fake the date natively in zone (by exposingFakeDatesomehow and manipulating it).Describe alternatives you've considered
I wrote it in the section above - 2 ways to solve this problem - patch jest's
setSystemTimeor expose a way to set a fake date manually by zone.jsThanks!