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
+
1
3
import React , {
2
4
Component ,
3
5
Fragment ,
@@ -27,9 +29,8 @@ import {
27
29
28
30
import { visitElement } from '../visitor'
29
31
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
33
34
34
35
let prevDispatcher = null
35
36
@@ -173,6 +174,7 @@ describe('visitElement', () => {
173
174
} )
174
175
175
176
it ( 'returns nothing for portal components' , ( ) => {
177
+ const document = new JSDOM ( ) . window . document
176
178
const portal = createPortal ( < Noop /> , document . createElement ( 'div' ) )
177
179
const children = visitElement ( portal , [ ] , ( ) => { } )
178
180
expect ( children . length ) . toBe ( 0 )
You can’t perform that action at this time.
0 commit comments