mirror of https://github.com/vuejs/core.git
chore: update test
This commit is contained in:
parent
e26787a92f
commit
129b9ee19e
|
@ -113,14 +113,15 @@ describe('reactivity/reactive', () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
// #8647
|
// #8647
|
||||||
test('observing nest reactive in set', () => {
|
test('observing Set with reactive initial value', () => {
|
||||||
const observed = reactive({})
|
const observed = reactive({})
|
||||||
const observedSet = reactive(new Set([observed]))
|
const observedSet = reactive(new Set([observed]))
|
||||||
|
|
||||||
|
expect(observedSet.has(observed)).toBe(true)
|
||||||
expect(observedSet.size).toBe(1)
|
expect(observedSet.size).toBe(1)
|
||||||
if (observedSet.has(observed)) {
|
|
||||||
// expect nothing happens
|
// expect nothing happens
|
||||||
observedSet.add(observed)
|
observedSet.add(observed)
|
||||||
}
|
|
||||||
expect(observedSet.size).toBe(1)
|
expect(observedSet.size).toBe(1)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue