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

Expected {} to equal {} #225

Open
IonicaBizau opened this issue Aug 21, 2017 · 1 comment
Open

Expected {} to equal {} #225

IonicaBizau opened this issue Aug 21, 2017 · 1 comment

Comments

@IonicaBizau
Copy link

> expect(Object.create(null)).toEqual({})
Error: Expected {} to equal {}

They are different, because of prototype, but the output is weird.

@ljharb
Copy link
Collaborator

ljharb commented Aug 21, 2017

It might be worth special-casing objects whose [[Prototype]] isn't Object.prototype in the debug output.

If that's managed by object-inspect, please file an issue there for it (I don't recall if this project uses it or not)

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

No branches or pull requests

2 participants