).toHaveBeenWarned()
})
- it('should support custom element', () => {
+ it('should support custom element via config.isCustomElement (deprecated)', () => {
const app = createApp({
template: '<custom></custom>'
})
expect(container.innerHTML).toBe('<custom></custom>')
})
+ it('should support custom element via config.compilerOptions.isCustomElement', () => {
+ const app = createApp({
+ template: '<custom></custom>'
+ })
+ const container = document.createElement('div')
+ app.config.compilerOptions.isCustomElement = tag => tag === 'custom'
+ app.mount(container)
+ expect(container.innerHTML).toBe('<custom></custom>')
+ })
+
it('should support using element innerHTML as template', () => {
const app = createApp({
data: () => ({