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

pretty-format: Omit unnecessary symbol filter for object keys #7457

Merged
merged 4 commits into from
Dec 24, 2018

Conversation

pedrottimark
Copy link
Contributor

@pedrottimark pedrottimark commented Dec 3, 2018

Summary

Goals:

This dubious filter began in pretty-format 1.1.0 to remove string keys whose values look like a symbol description:

However, code change was unnecessary because the test added in 1.1.0 passes with 1.0.0 :(

I decided to leave if (Object.getOwnPropertySymbols) { … } for now, because method isn’t in IE:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertySymbols#Browser_compatibility

Test plan

Existing test prints an object with properties and symbols still passes (for example, properties with symbol keys are not duplicated)

@pedrottimark pedrottimark requested review from rickhanlonii and thymikee and removed request for rickhanlonii December 3, 2018 18:38
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.

#trustthetests

@SimenB SimenB merged commit bf2f3d2 into jestjs:master Dec 24, 2018
@pedrottimark pedrottimark deleted the unnecessary-symbol-filter branch December 24, 2018 13:03
captain-yossarian pushed a commit to captain-yossarian/jest that referenced this pull request Jul 18, 2019
@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 12, 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.

4 participants