File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1+ import { JSDOM } from 'jsdom'
2+
13import React , {
24 Component ,
35 Fragment ,
@@ -27,9 +29,8 @@ import {
2729
2830import { visitElement } from '../visitor'
2931
30- const {
31- ReactCurrentDispatcher
32- } = ( React : any ) . __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
32+ const { ReactCurrentDispatcher } = ( React : any )
33+ . __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
3334
3435let prevDispatcher = null
3536
@@ -173,6 +174,7 @@ describe('visitElement', () => {
173174 } )
174175
175176 it ( 'returns nothing for portal components' , ( ) => {
177+ const document = new JSDOM ( ) . window . document
176178 const portal = createPortal ( < Noop /> , document . createElement ( 'div' ) )
177179 const children = visitElement ( portal , [ ] , ( ) => { } )
178180 expect ( children . length ) . toBe ( 0 )
You can’t perform that action at this time.
0 commit comments