Closed guncha closed 1 year ago
Due to how date-now gets a reference to the Date.now function at initialization time, it cannot be overridden when using jasmine.clock().install(). It works with module level mocking, but sometimes that's a bit of an overkill.
date-now
Date.now
jasmine.clock().install()
+1
Ssame problem with sinon's fake timers.
sinon
date-now is no longer used.
Ha, I'd totally forgotten about this - thanks for the followup!
Due to how
date-now
gets a reference to theDate.now
function at initialization time, it cannot be overridden when usingjasmine.clock().install()
. It works with module level mocking, but sometimes that's a bit of an overkill.