fix(reactivity): Map/Set identity methods should work even if raw value contains reactive entries
fix #799
This commit is contained in:
@@ -67,6 +67,14 @@ describe('reactivity/reactive/Array', () => {
|
||||
expect(arr.lastIndexOf(observed, 1)).toBe(-1)
|
||||
})
|
||||
|
||||
test('Array identity methods should work if raw value contains reactive objects', () => {
|
||||
const raw = []
|
||||
const obj = reactive({})
|
||||
raw.push(obj)
|
||||
const arr = reactive(raw)
|
||||
expect(arr.includes(obj)).toBe(true)
|
||||
})
|
||||
|
||||
test('Array identity methods should be reactive', () => {
|
||||
const obj = {}
|
||||
const arr = reactive([obj, {}])
|
||||
|
||||
Reference in New Issue
Block a user