I would like to set (mock) my custom time to the Node.js server for testing purposes. Something like this:
console.log(new Date());
// Sat Jun 30 2018 20:00:00 GMT+0100
// ^^
someFunctionToSetTime('Sat Jun 30 2018 12:00:00 GMT+0100')
// ^^
console.log(new Date());
// Sat Jun 30 2018 12:00:00 GMT+0100
// ^^
How do I do this?
P.S. I don't really want to fake the Date
class.