]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
test(reactivity): fixed small copy & paste error (#140)
authorAlexander Zibert <3660540+alexander-zibert@users.noreply.github.com>
Mon, 7 Oct 2019 00:18:47 +0000 (02:18 +0200)
committerEvan You <yyx990803@gmail.com>
Mon, 7 Oct 2019 00:18:47 +0000 (20:18 -0400)
packages/reactivity/__tests__/collections/WeakMap.spec.ts
packages/reactivity/__tests__/collections/WeakSet.spec.ts

index ddf7db597fd800f7e5b0d54c08ae9de7738a3b17..57b9669f4010814aa32faa7ab75e2ecd264931ce 100644 (file)
@@ -94,7 +94,7 @@ describe('reactivity/collections', () => {
     })
 
     it('should observed nested data', () => {
-      const observed = reactive(new Map())
+      const observed = reactive(new WeakMap())
       const key = {}
       observed.set(key, { a: 1 })
       let dummy
index 3dc2cc838831643bce12a0eb924796a9406865a3..2427de125e5ba812287611fd64716e45e8881e5a 100644 (file)
@@ -3,11 +3,11 @@ import { reactive, isReactive, effect, toRaw } from '../../src'
 describe('reactivity/collections', () => {
   describe('WeakSet', () => {
     it('instanceof', () => {
-      const original = new Set()
+      const original = new WeakSet()
       const observed = reactive(original)
       expect(isReactive(observed)).toBe(true)
-      expect(original instanceof Set).toBe(true)
-      expect(observed instanceof Set).toBe(true)
+      expect(original instanceof WeakSet).toBe(true)
+      expect(observed instanceof WeakSet).toBe(true)
     })
 
     it('should observe mutations', () => {