Skip to content

Handle arrays with properties in assert.deepEqual#20674

Merged
2 commits merged into
masterfrom
deepEqual
Dec 13, 2017
Merged

Handle arrays with properties in assert.deepEqual#20674
2 commits merged into
masterfrom
deepEqual

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Dec 13, 2017

Porting a fix from #20429

@ghost ghost force-pushed the deepEqual branch from 600a45b to 9b22c7d Compare December 13, 2017 16:35
@ghost ghost force-pushed the deepEqual branch from 9b22c7d to c892458 Compare December 13, 2017 16:35
@ghost
Copy link
Copy Markdown
Author

ghost commented Dec 13, 2017

Now that we're testing for this, had to change a few tests to use assert.lengthOf( instead of assert.deepEqual(emptyArray; a real fix for that is #20518.

@ghost ghost requested a review from weswigham December 13, 2017 17:09
Copy link
Copy Markdown
Member

@weswigham weswigham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels a tad unfortunate to do it this way (the deep equal library exposes an options object where you can pass in a comparator, so it could be handled that way), but I guess it's better for this behavior to be the default.

@ghost ghost merged commit 84eb25c into master Dec 13, 2017
@ghost ghost deleted the deepEqual branch December 13, 2017 19:50
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant