@@ -103,7 +103,10 @@ describe('ReactDOMLegacyFiber', () => {
103
103
container ,
104
104
) ;
105
105
106
- const textNode = ReactDOM . findDOMNode ( instance ) ;
106
+ const textNode =
107
+ ReactDOM . __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED . findDOMNode (
108
+ instance ,
109
+ ) ;
107
110
expect ( textNode ) . toBe ( container . firstChild ) ;
108
111
expect ( textNode . nodeType ) . toBe ( 3 ) ;
109
112
expect ( textNode . nodeValue ) . toBe ( 'foo' ) ;
@@ -121,7 +124,10 @@ describe('ReactDOMLegacyFiber', () => {
121
124
122
125
expect ( container . childNodes . length ) . toBe ( 2 ) ;
123
126
124
- const firstNode = ReactDOM . findDOMNode ( instance ) ;
127
+ const firstNode =
128
+ ReactDOM . __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED . findDOMNode (
129
+ instance ,
130
+ ) ;
125
131
expect ( firstNode ) . toBe ( container . firstChild ) ;
126
132
expect ( firstNode . tagName ) . toBe ( 'DIV' ) ;
127
133
} ) ;
@@ -149,7 +155,10 @@ describe('ReactDOMLegacyFiber', () => {
149
155
150
156
expect ( container . childNodes . length ) . toBe ( 2 ) ;
151
157
152
- const firstNode = ReactDOM . findDOMNode ( instance ) ;
158
+ const firstNode =
159
+ ReactDOM . __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED . findDOMNode (
160
+ instance ,
161
+ ) ;
153
162
expect ( firstNode ) . toBe ( container . firstChild ) ;
154
163
expect ( firstNode . tagName ) . toBe ( 'DIV' ) ;
155
164
} ) ;
@@ -172,7 +181,10 @@ describe('ReactDOMLegacyFiber', () => {
172
181
173
182
expect ( container . childNodes . length ) . toBe ( 2 ) ;
174
183
175
- const firstNode = ReactDOM . findDOMNode ( instance ) ;
184
+ const firstNode =
185
+ ReactDOM . __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED . findDOMNode (
186
+ instance ,
187
+ ) ;
176
188
expect ( firstNode ) . toBe ( container . firstChild ) ;
177
189
expect ( firstNode . tagName ) . toBe ( 'DIV' ) ;
178
190
} ) ;
@@ -849,13 +861,19 @@ describe('ReactDOMLegacyFiber', () => {
849
861
}
850
862
851
863
const myNodeA = ReactDOM . render ( < MyNode /> , container ) ;
852
- const a = ReactDOM . findDOMNode ( myNodeA ) ;
864
+ const a =
865
+ ReactDOM . __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED . findDOMNode (
866
+ myNodeA ,
867
+ ) ;
853
868
expect ( a . tagName ) . toBe ( 'DIV' ) ;
854
869
855
870
const myNodeB = ReactDOM . render ( < MyNode flag = { true } /> , container ) ;
856
871
expect ( myNodeA === myNodeB ) . toBe ( true ) ;
857
872
858
- const b = ReactDOM . findDOMNode ( myNodeB ) ;
873
+ const b =
874
+ ReactDOM . __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED . findDOMNode (
875
+ myNodeB ,
876
+ ) ;
859
877
expect ( b . tagName ) . toBe ( 'SPAN' ) ;
860
878
} ) ;
861
879
0 commit comments