File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -22,14 +22,13 @@ describe('setupContext', () => {
22
22
23
23
expect ( context ) . toBeDefined ( )
24
24
expect ( 'parent' in context ) . toBe ( true )
25
- expect ( context . root ) . toBe ( vm . $root )
26
- expect ( context . parent ) . toBe ( vm . $parent )
27
25
expect ( context . slots ) . toBeDefined ( )
28
26
expect ( context . attrs ) . toEqual ( vm . $attrs )
29
- expect ( context . listeners ) . toBe ( vm . $listeners )
30
27
31
- // CAUTION: this will be removed in 3.0
32
- // @ts -expect-error
28
+ // CAUTION: these will be removed in 3.0
29
+ expect ( context . root ) . toBe ( vm . $root )
30
+ expect ( context . parent ) . toBe ( vm . $parent )
31
+ expect ( context . listeners ) . toBe ( vm . $listeners )
33
32
expect ( context . refs ) . toBe ( vm . $refs )
34
33
expect ( typeof context . emit === 'function' ) . toBe ( true )
35
34
} )
@@ -51,7 +50,7 @@ describe('setupContext', () => {
51
50
test : defineComponent ( {
52
51
setup ( _ , { slots } ) {
53
52
return ( ) => {
54
- return h ( 'div' , [ slots . default ( ) , slots . item ( ) ] )
53
+ return h ( 'div' , [ slots . default ?. ( ) , slots . item ?. ( ) ] )
55
54
}
56
55
} ,
57
56
} ) ,
@@ -78,7 +77,7 @@ describe('setupContext', () => {
78
77
components : {
79
78
test : {
80
79
setup ( _ , { slots } ) {
81
- slots . default ( )
80
+ slots . default ?. ( )
82
81
} ,
83
82
} ,
84
83
} ,
You can’t perform that action at this time.
0 commit comments