File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ describe('compiler + runtime integration', () => {
131
131
) . toHaveBeenWarned ( )
132
132
} )
133
133
134
- it ( 'should support custom element' , ( ) => {
134
+ it ( 'should support custom element via config.isCustomElement (deprecated) ' , ( ) => {
135
135
const app = createApp ( {
136
136
template : '<custom></custom>'
137
137
} )
@@ -141,6 +141,16 @@ describe('compiler + runtime integration', () => {
141
141
expect ( container . innerHTML ) . toBe ( '<custom></custom>' )
142
142
} )
143
143
144
+ it ( 'should support custom element via config.compilerOptions.isCustomElement' , ( ) => {
145
+ const app = createApp ( {
146
+ template : '<custom></custom>'
147
+ } )
148
+ const container = document . createElement ( 'div' )
149
+ app . config . compilerOptions . isCustomElement = tag => tag === 'custom'
150
+ app . mount ( container )
151
+ expect ( container . innerHTML ) . toBe ( '<custom></custom>' )
152
+ } )
153
+
144
154
it ( 'should support using element innerHTML as template' , ( ) => {
145
155
const app = createApp ( {
146
156
data : ( ) => ( {
You can’t perform that action at this time.
0 commit comments