77 template ,
88 watchEffect ,
99} from '../src'
10- import { setCurrentInstance } from '../src/component'
1110import { makeRender } from './_utils'
1211
1312const define = makeRender < any > ( )
@@ -27,7 +26,7 @@ describe('attribute fallthrough', () => {
2726
2827 const foo = ref ( 1 )
2928 const id = ref ( 'a' )
30- const { instance , host } = define ( {
29+ const { host } = define ( {
3130 setup ( ) {
3231 return { foo, id }
3332 } ,
@@ -46,7 +45,6 @@ describe('attribute fallthrough', () => {
4645 )
4746 } ,
4847 } ) . render ( )
49- const reset = setCurrentInstance ( instance )
5048 expect ( host . innerHTML ) . toBe ( '<div id="a">1</div>' )
5149
5250 foo . value ++
@@ -56,7 +54,6 @@ describe('attribute fallthrough', () => {
5654 id . value = 'b'
5755 await nextTick ( )
5856 expect ( host . innerHTML ) . toBe ( '<div id="b">2</div>' )
59- reset ( )
6057 } )
6158
6259 it ( 'should not fallthrough if explicitly pass inheritAttrs: false' , async ( ) => {
@@ -74,7 +71,7 @@ describe('attribute fallthrough', () => {
7471
7572 const foo = ref ( 1 )
7673 const id = ref ( 'a' )
77- const { instance , host } = define ( {
74+ const { host } = define ( {
7875 setup ( ) {
7976 return { foo, id }
8077 } ,
@@ -93,7 +90,6 @@ describe('attribute fallthrough', () => {
9390 )
9491 } ,
9592 } ) . render ( )
96- const reset = setCurrentInstance ( instance )
9793 expect ( host . innerHTML ) . toBe ( '<div>1</div>' )
9894
9995 foo . value ++
@@ -103,7 +99,6 @@ describe('attribute fallthrough', () => {
10399 id . value = 'b'
104100 await nextTick ( )
105101 expect ( host . innerHTML ) . toBe ( '<div>2</div>' )
106- reset ( )
107102 } )
108103
109104 it ( 'should pass through attrs in nested single root components' , async ( ) => {
@@ -137,7 +132,7 @@ describe('attribute fallthrough', () => {
137132
138133 const foo = ref ( 1 )
139134 const id = ref ( 'a' )
140- const { instance , host } = define ( {
135+ const { host } = define ( {
141136 setup ( ) {
142137 return { foo, id }
143138 } ,
@@ -156,7 +151,6 @@ describe('attribute fallthrough', () => {
156151 )
157152 } ,
158153 } ) . render ( )
159- const reset = setCurrentInstance ( instance )
160154 expect ( host . innerHTML ) . toBe ( '<div foo="1" id="a">1</div>' )
161155
162156 foo . value ++
@@ -166,6 +160,5 @@ describe('attribute fallthrough', () => {
166160 id . value = 'b'
167161 await nextTick ( )
168162 expect ( host . innerHTML ) . toBe ( '<div foo="2" id="b">2</div>' )
169- reset ( )
170163 } )
171164} )
0 commit comments