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 {
12
12
createApp ,
13
13
computed
14
14
} from '@vue/runtime-test'
15
+ import { render as domRender } from 'vue'
15
16
16
17
describe ( 'api: options' , ( ) => {
17
18
test ( 'data' , async ( ) => {
@@ -1035,6 +1036,19 @@ describe('api: options', () => {
1035
1036
expect ( renderToString ( h ( Comp ) ) ) . toBe ( 'base,base' )
1036
1037
} )
1037
1038
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
+
1038
1052
test ( 'options defined in component have higher priority' , async ( ) => {
1039
1053
const Mixin = {
1040
1054
msg1 : 'base'
You can’t perform that action at this time.
0 commit comments