Open
Description
Current behavior
If I mock the current date with cy.clock(), and then I call it again later in my test, the current date will not be changed and new invocations of new Date()
will return my old mocked date.
Additionally, the second cy.clock
call is not even shown in the log
Desired behavior
Something like this should work:
cy.clock(Date.UTC(2021, 2, 31);
cy.visit(....);
....
cy.clock(Date.UTC(2021, 4, 20);
cy.reload();
...
Test code to reproduce
https://github.com/Lehren/cypress-test-tiny
Cypress Version
13.15.0
Node version
v16.20.2
Operating System
macOS 14.3.1
Debug Logs
No response
Other
Cypress testlog :
Note, no second clock
call