We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44a6b08 commit 735ded4Copy full SHA for 735ded4
packages/runtime-core/__tests__/vnode.spec.ts
@@ -50,6 +50,12 @@ describe('vnode', () => {
50
expect(vnode.type).toBe(Comment)
51
})
52
53
+ test('show warn when create with self-close tag', () => {
54
+ const vnode = createVNode('img', null, createVNode('p'))
55
+ expect("don't render child nodes in a self-closing tag").toHaveBeenWarned()
56
+ expect(vnode.type).toBe('img')
57
+ })
58
+
59
test('create from an existing vnode', () => {
60
const vnode1 = createVNode('p', { id: 'foo' })
61
const vnode2 = createVNode(vnode1, { class: 'bar' }, 'baz')
0 commit comments