@@ -798,9 +798,18 @@ describe('compiler: element transform', () => {
|
||||
describe('dynamic component', () => {
|
||||
test('static binding', () => {
|
||||
const { node, root } = parseWithBind(`<component is="foo" />`)
|
||||
expect(root.helpers).not.toContain(RESOLVE_DYNAMIC_COMPONENT)
|
||||
expect(root.helpers).toContain(RESOLVE_DYNAMIC_COMPONENT)
|
||||
expect(node).toMatchObject({
|
||||
tag: '_component_foo'
|
||||
tag: {
|
||||
callee: RESOLVE_DYNAMIC_COMPONENT,
|
||||
arguments: [
|
||||
{
|
||||
type: NodeTypes.SIMPLE_EXPRESSION,
|
||||
content: 'foo',
|
||||
isStatic: true
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@@ -813,7 +822,8 @@ describe('compiler: element transform', () => {
|
||||
arguments: [
|
||||
{
|
||||
type: NodeTypes.SIMPLE_EXPRESSION,
|
||||
content: 'foo'
|
||||
content: 'foo',
|
||||
isStatic: false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user