Skip to content

Commit

Permalink
Fix CI fails date comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
aedart committed Feb 25, 2024
1 parent a98c24c commit 1d8e193
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/browser/packages/support/objects/merge.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,9 @@ describe('@aedart/support/objects', () => {
});

it('can clones objects of native kind', () => {

const now = new Date();

const dataSet = [
{
name: 'ArrayBuffer',
Expand Down Expand Up @@ -699,10 +702,10 @@ describe('@aedart/support/objects', () => {
},
{
name: 'Date',
source: { value: new Date('2024-02-19 14:13:25') },
source: { value: now },
expectedInstanceOf: Date,
match: (cloned) => {
return cloned.valueOf() === 1708348405000; // milliseconds for since the epoch for date
return cloned.valueOf() === now.valueOf(); // milliseconds for since the epoch for date
}
},
{
Expand Down

0 comments on commit 1d8e193

Please sign in to comment.