This would be silliest question which I am asking here. I was going through Cypress automation and was working on one of the scenario.
I wanted to verify whether the date is matching or containing the date or not.
System date – 11/30/2021 06:18:33 PM
and derived application date – 11/30/2021 6:18:38
How can I match and assert this using Cypress?
expect('11/30/2021 06:18:33 PM').to.have.string('11/30/2021 6:18:38');
I am getting below error :-
AssertionError
expected '11/30/2021 06:18:33 PM' to contain '11/30/2021 6:18:38'