Mockdate
mockdate
Mock Date object that can be used to change when "now" is.
mockdate
the names says it all!
This module save the current date context to _date
and _getTimezoneOffset = Date.prototype.getTimezoneOffset
internally and overwrites them with simpler custom implementation which would useful for unit tests et.al
Get it: npm install --save mockdate
Sample usage:
1 2 3 4 |
|
GIF FTW!