Skip to content

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