Skip to content

test(reactivity): add tests for object with symbols #969

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

Merged
merged 1 commit into from
Apr 16, 2020

Conversation

pikax
Copy link
Member

@pikax pikax commented Apr 16, 2020

This add tests for symbols and dts tests.

This is a follow up to the #579

Question, when using a custom symbol it seems you can't do toBe

 expect(objRef.value[customSymbol]).toBe(obj[customSymbol]) // fails
 expect(objRef.value[customSymbol]).toStrictEqual(obj[customSymbol])

Do we change the object to reactive for symbol properties?

@yyx990803
Copy link
Member

That's correct. Only built-in symbol properties are returned raw. Users may expect reactivity on custom symbol properties.

@yyx990803 yyx990803 merged commit d7ae1d0 into vuejs:master Apr 16, 2020
pikax added a commit to pikax/vue-next that referenced this pull request Apr 29, 2020
@pikax pikax deleted the types/test_symbol_ref branch May 6, 2020 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants