Skip to content

types(reactivity): Simplify the SymbolExtract #4162

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 2 commits into from
Jul 28, 2021

Conversation

Picknight
Copy link
Contributor

No description provided.

@yyx990803 yyx990803 requested a review from pikax July 21, 2021 19:53
Copy link
Member

@pikax pikax left a comment

Choose a reason for hiding this comment

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

Can you update the test "should keep symbols" on ref.spec.ts

  it('should keep symbols', () => {
    const customSymbol = Symbol()
    const obj = {
      [Symbol.asyncIterator]: { a: 1 },
      [Symbol.unscopables]: { b: '1' },
      [Symbol.match]: ref(1),
      [customSymbol]: { c: [1, 2, 3] }
    }

    const objRef = ref(obj)

    expect(objRef.value[Symbol.asyncIterator]).toBe(obj[Symbol.asyncIterator])
    expect(objRef.value[Symbol.unscopables]).toBe(obj[Symbol.unscopables])
    expect(objRef.value[Symbol.match]).toStrictEqual(ref(1))
    expect(objRef.value[customSymbol]).toStrictEqual(obj[customSymbol])
  })

Because without that test, all the tests pass even without the ExtractSymbol

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.

4 participants