-
Notifications
You must be signed in to change notification settings - Fork 21
Description
Hi,
I love what you've done polyfilling Temporal - I'm working on a new project and have no desire to keep using Dates for it. However I have encountered an odd bug when checking equality of arrays of Temporal objects (recreated in the attached test) which has shaken my confidence a bit...
If I do straight equality checks for two PlainDates, or PlainTimes, or ZonedDateTimes then it all works as expected - if A and B are equal then vitest's expect(a).toEqual(b) passes, if they are different it fails.
However if instead I run expect([a,b]).toEqual([b,a]) it always passes, regardless of whether a and b are the same or different. Not ideal!
This is on node 23.5.0, vitest 3.1.1, temporal 0.30.0, typescript 5.8.2.
Any ideas? I'm not sure if the problem sits inside the library, vitest or somewhere in-between but it certainly isn't the outcome I'd expect!
Thanks,
Tom
