File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
packages/runtime-core/__tests__ Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
1212 createApp ,
1313 computed
1414} from '@vue/runtime-test'
15+ import { render as domRender } from 'vue'
1516
1617describe ( 'api: options' , ( ) => {
1718 test ( 'data' , async ( ) => {
@@ -1035,6 +1036,19 @@ describe('api: options', () => {
10351036 expect ( renderToString ( h ( Comp ) ) ) . toBe ( 'base,base' )
10361037 } )
10371038
1039+ test ( 'extends template' , ( ) => {
1040+ const Comp = {
1041+ extends : {
1042+ template : `<h1>Foo</h1>`
1043+ }
1044+ }
1045+
1046+ const root = document . createElement ( 'div' ) as any
1047+ domRender ( h ( Comp ) , root )
1048+ expect ( root . innerHTML ) . toBe ( `<h1>Foo</h1>` )
1049+ } )
1050+
1051+
10381052 test ( 'options defined in component have higher priority' , async ( ) => {
10391053 const Mixin = {
10401054 msg1 : 'base'
You can’t perform that action at this time.
0 commit comments