|
|
@@ -131,7 +131,7 @@ describe('compiler + runtime integration', () => {
|
|
|
).toHaveBeenWarned()
|
|
|
})
|
|
|
|
|
|
- it('should support custom element', () => {
|
|
|
+ it('should support custom element via config.isCustomElement (deprecated)', () => {
|
|
|
const app = createApp({
|
|
|
template: '<custom></custom>'
|
|
|
})
|
|
|
@@ -141,6 +141,16 @@ describe('compiler + runtime integration', () => {
|
|
|
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: () => ({
|