from my experience I can say best to avoid using in your code
new Date()
rather use new Date(Date.now())
and here is why, Date.now()
is easier to mock,
add script into watcher as in the picture, notice system date vs logged date
if(!document.querySelector('script#mock-date')){
const script = document.createElement('script');
script.id='mock-date';
script.innerHTML = `Date.now = ()=> new Date('2020-01-01T00:00:00+10:00').getTime();`;
document.head.appendChild(script);
}