]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: fix Portal test types
authorEvan You <yyx990803@gmail.com>
Tue, 24 Mar 2020 16:58:12 +0000 (12:58 -0400)
committerEvan You <yyx990803@gmail.com>
Tue, 24 Mar 2020 16:58:12 +0000 (12:58 -0400)
packages/runtime-core/__tests__/components/Portal.spec.ts

index 52e1676a5e71eab8fc4efe596f569381550e97b2..bdd50c7fd53773724201f1ea24ca530321aacecc 100644 (file)
@@ -11,7 +11,7 @@ import {
   TestElement,
   TestNode
 } from '@vue/runtime-test'
-import { VNodeArrayChildren } from '../../src/vnode'
+import { VNodeArrayChildren, createVNode } from '../../src/vnode'
 
 describe('renderer: portal', () => {
   test('should work', () => {
@@ -71,7 +71,7 @@ describe('renderer: portal', () => {
 
     expect(serializeInner(target)).toMatchSnapshot()
 
-    children.value = [h(Text, 'teleported')]
+    children.value = [createVNode(Text, null, 'teleported')]
     await nextTick()
 
     expect(serializeInner(target)).toMatchSnapshot()