[go: up one dir, main page]

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

Fix diff highlight of symbol-keyed object. #9499

Merged
merged 4 commits into from
Feb 2, 2020

Conversation

WeiAnAn
Copy link
Contributor
@WeiAnAn WeiAnAn commented Feb 2, 2020

Summary

Fixes #9432.

Use Object.getOwnPropertySymbols to traverse object's symbol key can fix this issue.

Thanks @pedrottimark to point out this edge case.

Test plan

Add symbol-keyed object tests.

Copy link
Member
@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

Thank you! 🙂

@codecov-io
Copy link
codecov-io commented Feb 2, 2020

Codecov Report

Merging #9499 into master will increase coverage by 0.01%.
The diff coverage is 62.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9499      +/-   ##
==========================================
+ Coverage   65.01%   65.03%   +0.01%     
==========================================
  Files         283      283              
  Lines       12135    12148      +13     
  Branches     3003     3009       +6     
==========================================
+ Hits         7890     7900      +10     
- Misses       3604     3606       +2     
- Partials      641      642       +1
Impacted Files Coverage Δ
packages/jest-config/src/Descriptions.ts 100% <ø> (ø) ⬆️
packages/jest-config/src/normalize.ts 77.87% <100%> (+0.12%) ⬆️
packages/jest-resolve/src/index.ts 45.94% <57.14%> (+0.69%) ⬆️
packages/expect/src/utils.ts 96.22% <0%> (+1.25%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 56cab73...2dce31e. Read the comment docs.

Copy link
Contributor
@jeysal jeysal left a comment

Choose a reason for hiding this comment

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

This looks very solid, thanks @WeiAnAn!

Copy link
Contributor
@pedrottimark pedrottimark left a comment

Choose a reason for hiding this comment

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

Thank you very much for clear code and your willingness to add tests to the expect package.

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong highlight in diffs when using asymmetric matcher in symbol-keyed object property.
6 participants