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

assert.deepEqual / expect().to.deep.equal incorrect with Symbols as keys #1358

Closed
derMart opened this issue Aug 24, 2020 · 2 comments · Fixed by #1483
Closed

assert.deepEqual / expect().to.deep.equal incorrect with Symbols as keys #1358

derMart opened this issue Aug 24, 2020 · 2 comments · Fixed by #1483

Comments

@derMart
Copy link

derMart commented Aug 24, 2020

consider this:

var sym = Symbol('foo');
expect({[sym] : 1}).to.deep.equal({[sym] : 0});
assert.deepEqual({[sym] : 1}, {[sym] : 0});

I would expect both variants to fail, but they pass and do not throw an Error.
Using chai 4.2.0

The documentation does not state anything about this behaviour.
Is this working as intended or a bug?

@derMart derMart changed the title assert.deepEqual / expect().to.deep.equal incorrect whith Symbols as keys assert.deepEqual / expect().to.deep.equal incorrect with Symbols as keys Aug 24, 2020
@snewcomer
Copy link
Contributor

Seeing this as well. Going to dig around and see if I can make a PR...

@snewcomer
Copy link
Contributor

snewcomer commented Nov 7, 2022

This PR has been merged - chaijs/deep-eql#83

Awaiting a bump on deep-eql then we can work on this PR - #1458!

cc @keithamus

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

Successfully merging a pull request may close this issue.

2 participants