I have a Node.js test where I'm asserting that two values of type Date should be equal, but the test is unexpectedly failing with AssertionError [ERR_ASSERTION]: Input objects identical but not reference equal
.
The (simplified) test code is:
it('should set the date correctly', () => {
// (Code that gets "myActualDate" from the page under test goes here)
const myExpectedDate = new Date('2020-05-06');
assert.strictEqual(myActualDate, myExpectedDate);
});
How should I change this test code such that the test passes?