File tree Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -214,17 +214,8 @@ test.each([
214214} )
215215
216216describe ( 'checkVisibility API integration' , ( ) => {
217- let originalCheckVisibility
218-
219217 beforeEach ( ( ) => {
220- // This may not exist depending on the environment
221- originalCheckVisibility = Element . prototype . checkVisibility
222- } )
223-
224- afterEach ( ( ) => {
225- if ( originalCheckVisibility ) {
226- Element . prototype . checkVisibility = originalCheckVisibility
227- } else {
218+ if ( Element . prototype . checkVisibility ) {
228219 delete Element . prototype . checkVisibility
229220 }
230221 } )
@@ -246,9 +237,6 @@ describe('checkVisibility API integration', () => {
246237 } )
247238
248239 test ( 'falls back to getComputedStyle when checkVisibility unavailable' , ( ) => {
249- // Remove checkVisibility to test fallback
250- delete Element . prototype . checkVisibility
251-
252240 const { container} = render ( '<button style="display: none;">Test</button>' )
253241 const button = container . querySelector ( 'button' )
254242
@@ -276,10 +264,6 @@ describe('checkVisibility API integration', () => {
276264 const resultWithoutAPI = isInaccessible ( button2 )
277265
278266 expect ( resultWithAPI ) . toBe ( resultWithoutAPI )
279-
280- if ( originalCheckVisibility ) {
281- Element . prototype . checkVisibility = originalCheckVisibility
282- }
283267 } )
284268 } )
285269} )
You can’t perform that action at this time.
0 commit comments