vue3-yuanma/packages/runtime-dom/__tests__/createApp.spec.ts

16 lines
401 B
TypeScript
Raw Normal View History

import { createApp, h } from '../src'
describe('createApp for dom', () => {
// #2926
test('mount to SVG container', () => {
const root = document.createElementNS('http://www.w3.org/2000/svg', 'svg')
createApp({
render() {
return h('g')
}
}).mount(root)
expect(root.children.length).toBe(1)
expect(root.children[0] instanceof SVGElement).toBe(true)
})
})