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

deepEqual with skip seems to ignore missing properties #337

Closed
rankida opened this issue Sep 26, 2019 · 1 comment
Closed

deepEqual with skip seems to ignore missing properties #337

rankida opened this issue Sep 26, 2019 · 1 comment
Assignees
Labels
bug
Milestone

Comments

@rankida
Copy link

@rankida rankida commented Sep 26, 2019

> Hoek.deepEqual({a: 1}, {a:1, b: 2})
false
> Hoek.deepEqual({a: 1}, {a:1, b: 2}, { skip: ['a'] })
true
> Hoek.deepEqual({a: 1, b: 2}, {a:1}, { skip: ['a'] })
false

☝️ the middle example is surprising to me as b exists only in the second object and yet it is considered to be deepEqual.

I wonder if skip has the effect of turning part to true?

@hueniverse hueniverse self-assigned this Sep 26, 2019
@hueniverse hueniverse added the bug label Sep 26, 2019
@hueniverse

This comment has been minimized.

Copy link
Member

@hueniverse hueniverse commented Sep 26, 2019

It ignores key counts which has this bug as side effect.

@hueniverse hueniverse added this to the 8.2.5 milestone Sep 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.