File tree 1 file changed +4
-12
lines changed
packages/runtime-vapor/__tests__
1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -59,16 +59,12 @@ describe('api: provide/inject', () => {
59
59
const Provider = define ( {
60
60
setup ( ) {
61
61
provide ( key , 1 )
62
- const instance = getCurrentInstance ( ) !
63
- return createComponent ( Middle , instance )
62
+ return createComponent ( Middle , getCurrentInstance ( ) ! )
64
63
} ,
65
64
} )
66
65
67
66
const Middle = {
68
- render ( ) {
69
- const instance = getCurrentInstance ( ) !
70
- return createComponent ( Consumer , instance )
71
- } ,
67
+ render : ( ) => createComponent ( Consumer , getCurrentInstance ( ) ! ) ,
72
68
}
73
69
74
70
const Consumer = {
@@ -90,16 +86,12 @@ describe('api: provide/inject', () => {
90
86
const Provider = define ( {
91
87
setup ( ) {
92
88
provide ( 'foo' , 'foo' )
93
- const instance = getCurrentInstance ( ) !
94
- return createComponent ( Middle , instance )
89
+ return createComponent ( Middle , getCurrentInstance ( ) ! )
95
90
} ,
96
91
} )
97
92
98
93
const Middle = {
99
- render ( ) {
100
- const instance = getCurrentInstance ( ) !
101
- return createComponent ( Consumer , instance )
102
- } ,
94
+ render : ( ) => createComponent ( Consumer , getCurrentInstance ( ) ! ) ,
103
95
}
104
96
105
97
const Consumer = {
You can’t perform that action at this time.
0 commit comments