I have to show a message when you select a date and that date is yesterday, but only show this message when you are between the 00:00 and the 02:00 of the day of today.
I'm testing with Jest, but after tried with the jest.useFakeTimers("modern").setSystemTime(moment().startOf("day").add(3, "hour").toDate())
I have always the test passing green.
How I can mock the current time between the 00:00 and 02:00 as if the test is executed during that time?