We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d4ad8a commit 3cb45ebCopy full SHA for 3cb45eb
packages/reactivity/__tests__/reactive.spec.ts
@@ -301,6 +301,13 @@ describe('reactivity/reactive', () => {
301
expect(() => markRaw(obj)).not.toThrowError()
302
})
303
304
+ test('should not markRaw object as reactive', () => {
305
+ const a = reactive({ a: 1 })
306
+ const b = reactive({ b: 2 }) as any
307
+ b.a = markRaw(toRaw(a))
308
+ expect(b.a === a).toBe(false)
309
+ })
310
+
311
test('should not observe non-extensible objects', () => {
312
const obj = reactive({
313
foo: Object.preventExtensions({ a: 1 }),
0 commit comments