]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
test(compiler-core): test dynamic component block
authorEvan You <yyx990803@gmail.com>
Wed, 22 Apr 2020 18:47:31 +0000 (14:47 -0400)
committerEvan You <yyx990803@gmail.com>
Wed, 22 Apr 2020 18:47:31 +0000 (14:47 -0400)
packages/compiler-core/__tests__/transforms/transformElement.spec.ts

index a25756d6bed7c81d217e594c34d15d1f8305a150..9b08c4c63654164886ca6ed0add881c703b745f3 100644 (file)
@@ -809,6 +809,7 @@ describe('compiler: element transform', () => {
       const { node, root } = parseWithBind(`<component is="foo" />`)
       expect(root.helpers).toContain(RESOLVE_DYNAMIC_COMPONENT)
       expect(node).toMatchObject({
+        isBlock: true,
         tag: {
           callee: RESOLVE_DYNAMIC_COMPONENT,
           arguments: [
@@ -826,6 +827,7 @@ describe('compiler: element transform', () => {
       const { node, root } = parseWithBind(`<component :is="foo" />`)
       expect(root.helpers).toContain(RESOLVE_DYNAMIC_COMPONENT)
       expect(node).toMatchObject({
+        isBlock: true,
         tag: {
           callee: RESOLVE_DYNAMIC_COMPONENT,
           arguments: [