test(reactivity): fixed small copy & paste error (#140)

This commit is contained in:
Alexander Zibert 2019-10-07 02:18:47 +02:00 committed by Evan You
parent c6b7afcc23
commit 4605f43b95
2 changed files with 4 additions and 4 deletions

View File

@ -94,7 +94,7 @@ describe('reactivity/collections', () => {
}) })
it('should observed nested data', () => { it('should observed nested data', () => {
const observed = reactive(new Map()) const observed = reactive(new WeakMap())
const key = {} const key = {}
observed.set(key, { a: 1 }) observed.set(key, { a: 1 })
let dummy let dummy

View File

@ -3,11 +3,11 @@ import { reactive, isReactive, effect, toRaw } from '../../src'
describe('reactivity/collections', () => { describe('reactivity/collections', () => {
describe('WeakSet', () => { describe('WeakSet', () => {
it('instanceof', () => { it('instanceof', () => {
const original = new Set() const original = new WeakSet()
const observed = reactive(original) const observed = reactive(original)
expect(isReactive(observed)).toBe(true) expect(isReactive(observed)).toBe(true)
expect(original instanceof Set).toBe(true) expect(original instanceof WeakSet).toBe(true)
expect(observed instanceof Set).toBe(true) expect(observed instanceof WeakSet).toBe(true)
}) })
it('should observe mutations', () => { it('should observe mutations', () => {