https://cypress.io logo
I'm trying to do a simple assertion that the day o...
# e2e-testing
s
I'm trying to do a simple assertion that the day of a
mm/dd/yyyy
string matches my desired
daydate
via: the
startDate
I'm passing in is just
11
Copy code
TypeScript
getCustomDateStartDateInput()
        .invoke('val')
        .then((date) => {
            cy.log('Desired Date:\t' + startDate);
            console.log('Actual Start Date\t' + date);
            console.log(String(date).split('/')[1]);
            expect(String(date).split('/')[1]).to.equal(startDate);
        });
For some reason the assertion in the command palette looks like this: