Skip to content

test merge and mergeDeep of Map instances with Symbol keys #1416

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

Closed
wants to merge 1 commit into from
Closed

test merge and mergeDeep of Map instances with Symbol keys #1416

wants to merge 1 commit into from

Conversation

abacaphiliac
Copy link
Contributor

adds tests to cover merge and mergeDeep of Map instances with Symbols as keys.

@abacaphiliac
Copy link
Contributor Author

@leebyron Am I crazy, or is this actually working? I think this proves the use-case I described in #1392, with no changes to source. Did something else in master change?

@leebyron
Copy link
Collaborator

Is it possible that Symbol is getting compiled by typescript to a string?

@leebyron
Copy link
Collaborator

I can't reproduce this test passing locally, something is fishy

@abacaphiliac
Copy link
Contributor Author

I'm not sure why you and I are seeing different things, but I did throw a couple of console.log statements in one of these tests, and this is what came out...

  console.log __tests__/merge.ts:224
    Map {}

  console.log __tests__/merge.ts:225
    Map {}

I'll make sure the tests I'm running check for specific values at specific key depths without lazily checking object equivalency. These false positives (for me) were definitely under the radar!

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

Successfully merging this pull request may close these issues.

3 participants