I am coding cypress tests. I use cypress v10.3.0.
I am getting a wrong date when I use dayjs function for the second time.
var dayjs = require('dayjs')
cy.log(dayjs(new Date()).format('DD/MM/YYYY HH:mm:ss'))
cy.wait(5000)
cy.log(dayjs(new Date()).format('DD/MM/YYYY HH:mm:ss'))
Output picture:
output text (same text as in the picture):
- log 13/07/2022 10:20:24
- wait 5000
- log 13/07/2022 10:20:24
First log is ok, but second log should be: 13/07/2022 10:25:24
Why is the first and second log the same? Thank you for your help