]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
wip: make runtime-test nodes non-observable
authorEvan You <yyx990803@gmail.com>
Thu, 29 Aug 2019 20:38:57 +0000 (16:38 -0400)
committerEvan You <yyx990803@gmail.com>
Thu, 29 Aug 2019 20:38:57 +0000 (16:38 -0400)
packages/runtime-test/src/nodeOps.ts

index 7de1ab774c9c72d095a6342dc2947617a9ef7ea4..be98f9fcbad5d41e7ef97a01657f1fc70a9bde8b 100644 (file)
@@ -1,3 +1,5 @@
+import { markNonReactive } from '@vue/reactivity'
+
 export const enum NodeTypes {
   TEXT = 'text',
   ELEMENT = 'element',
@@ -85,6 +87,8 @@ function createElement(tag: string): TestElement {
     targetNode: node,
     tag
   })
+  // avoid test nodes from being observed
+  markNonReactive(node)
   return node
 }
 
@@ -101,6 +105,8 @@ function createText(text: string): TestText {
     targetNode: node,
     text
   })
+  // avoid test nodes from being observed
+  markNonReactive(node)
   return node
 }
 
@@ -117,6 +123,8 @@ function createComment(text: string): TestComment {
     targetNode: node,
     text
   })
+  // avoid test nodes from being observed
+  markNonReactive(node)
   return node
 }