Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for tc39/proposal-temporal #84

Closed
Ucandoit opened this issue May 30, 2022 · 1 comment
Closed

Support for tc39/proposal-temporal #84

Ucandoit opened this issue May 30, 2022 · 1 comment

Comments

@Ucandoit
Copy link
Contributor

Hello, I've recently encounted a problem with chai's deep equal assertion when an object contains a property of type Temporal.PlainDate. For example the following assertion does not result in error while it's not the same date.

expect({ name: 'a', date: Temporal.PlainDate.from('2022-05-30') }).to.deep.equal({
  name: 'a',
  date: Temporal.PlainDate.from('2022-05-31'),
});

The reason is that in deep-eql https://github.com/chaijs/deep-eql/blob/main/index.js#L197 the Temporal.PlainDate type is not managed since it's still in stage 3.
What's your opinion on making a PR to add the Temporal type comparison?
Otherwise do you have alternative solutions to make the comparison work?

@keithamus keithamus transferred this issue from chaijs/chai May 31, 2022
@keithamus
Copy link
Member

Sounds like a good idea! PRs welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants