feat(runtime-core): add special property to get class component options (#821)
This commit is contained in:
@@ -46,6 +46,15 @@ describe('vnode', () => {
|
||||
}
|
||||
})
|
||||
|
||||
test('create with class component', () => {
|
||||
class Component {
|
||||
$props: any
|
||||
static __vccOpts = { template: '<div />' }
|
||||
}
|
||||
const vnode = createVNode(Component)
|
||||
expect(vnode.type).toEqual(Component.__vccOpts)
|
||||
})
|
||||
|
||||
describe('class normalization', () => {
|
||||
test('string', () => {
|
||||
const vnode = createVNode('p', { class: 'foo baz' })
|
||||
|
||||
Reference in New Issue
Block a user