fix(compiler-core): allow PascalCase dynamic component tag usage (#3508)
fix #3507
This commit is contained in:
@@ -836,6 +836,24 @@ describe('compiler: element transform', () => {
|
||||
})
|
||||
})
|
||||
|
||||
test('capitalized version w/ static binding', () => {
|
||||
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: [
|
||||
{
|
||||
type: NodeTypes.SIMPLE_EXPRESSION,
|
||||
content: 'foo',
|
||||
isStatic: true
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
test('dynamic binding', () => {
|
||||
const { node, root } = parseWithBind(`<component :is="foo" />`)
|
||||
expect(root.helpers).toContain(RESOLVE_DYNAMIC_COMPONENT)
|
||||
|
||||
Reference in New Issue
Block a user