[FIX] reactivity: do not observe eventtarget and other stuff

This commit is contained in:
Géry Debongnie
2022-01-21 11:33:30 +01:00
committed by Aaron Bohy
parent 0a73154985
commit d828f39a2d
2 changed files with 22 additions and 8 deletions
+13
View File
@@ -1093,6 +1093,19 @@ describe("Reactivity", () => {
expect(n).toBe(1);
expect(state.k).toEqual({ n: 2 });
});
test("can add collections set/weakset/map/weakmap in a reactive object", () => {
const rawSet = new Set();
const rawWeakSet = new WeakSet();
const rawMap = new Map();
const rawWeakMap = new WeakMap();
const obj = reactive({ rawSet, rawWeakSet, rawMap, rawWeakMap });
expect(obj.rawSet).toBe(rawSet);
expect(obj.rawWeakSet).toBe(rawWeakSet);
expect(obj.rawMap).toBe(rawMap);
expect(obj.rawWeakMap).toBe(rawWeakMap);
});
});
describe("markRaw", () => {