12
12
let React ;
13
13
let ReactDOM ;
14
14
let ReactDOMClient ;
15
- let ReactTestUtils ;
16
15
let TestComponent ;
17
16
let act ;
18
17
let theInnerDivRef ;
@@ -25,7 +24,6 @@ describe('refs-destruction', () => {
25
24
React = require ( 'react' ) ;
26
25
ReactDOM = require ( 'react-dom' ) ;
27
26
ReactDOMClient = require ( 'react-dom/client' ) ;
28
- ReactTestUtils = require ( 'react-dom/test-utils' ) ;
29
27
act = require ( 'internal-test-utils' ) . act ;
30
28
31
29
class ClassComponent extends React . Component {
@@ -75,7 +73,7 @@ describe('refs-destruction', () => {
75
73
root . render ( < TestComponent /> ) ;
76
74
} ) ;
77
75
78
- expect ( ReactTestUtils . isDOMComponent ( theInnerDivRef . current ) ) . toBe ( true ) ;
76
+ expect ( theInnerDivRef . current ) . toBeInstanceOf ( Element ) ;
79
77
expect ( theInnerClassComponentRef . current ) . toBeTruthy ( ) ;
80
78
81
79
root . unmount ( ) ;
@@ -91,7 +89,7 @@ describe('refs-destruction', () => {
91
89
root . render ( < TestComponent /> ) ;
92
90
} ) ;
93
91
94
- expect ( ReactTestUtils . isDOMComponent ( theInnerDivRef . current ) ) . toBe ( true ) ;
92
+ expect ( theInnerDivRef . current ) . toBeInstanceOf ( Element ) ;
95
93
expect ( theInnerClassComponentRef . current ) . toBeTruthy ( ) ;
96
94
97
95
await act ( async ( ) => {
@@ -109,7 +107,7 @@ describe('refs-destruction', () => {
109
107
root . render ( < TestComponent /> ) ;
110
108
} ) ;
111
109
112
- expect ( ReactTestUtils . isDOMComponent ( theInnerDivRef . current ) ) . toBe ( true ) ;
110
+ expect ( theInnerDivRef . current ) . toBeInstanceOf ( Element ) ;
113
111
expect ( theInnerClassComponentRef . current ) . toBeTruthy ( ) ;
114
112
115
113
await act ( async ( ) => {
0 commit comments