@@ -111,7 +111,10 @@ describe('ReactDOMLegacyFiber', () => {
111
111
container ,
112
112
) ;
113
113
114
- const textNode = ReactDOM . findDOMNode ( instance ) ;
114
+ const textNode =
115
+ ReactDOM . __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED . findDOMNode (
116
+ instance ,
117
+ ) ;
115
118
expect ( textNode ) . toBe ( container . firstChild ) ;
116
119
expect ( textNode . nodeType ) . toBe ( 3 ) ;
117
120
expect ( textNode . nodeValue ) . toBe ( 'foo' ) ;
@@ -130,7 +133,10 @@ describe('ReactDOMLegacyFiber', () => {
130
133
131
134
expect ( container . childNodes . length ) . toBe ( 2 ) ;
132
135
133
- const firstNode = ReactDOM . findDOMNode ( instance ) ;
136
+ const firstNode =
137
+ ReactDOM . __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED . findDOMNode (
138
+ instance ,
139
+ ) ;
134
140
expect ( firstNode ) . toBe ( container . firstChild ) ;
135
141
expect ( firstNode . tagName ) . toBe ( 'DIV' ) ;
136
142
} ) ;
@@ -159,7 +165,10 @@ describe('ReactDOMLegacyFiber', () => {
159
165
160
166
expect ( container . childNodes . length ) . toBe ( 2 ) ;
161
167
162
- const firstNode = ReactDOM . findDOMNode ( instance ) ;
168
+ const firstNode =
169
+ ReactDOM . __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED . findDOMNode (
170
+ instance ,
171
+ ) ;
163
172
expect ( firstNode ) . toBe ( container . firstChild ) ;
164
173
expect ( firstNode . tagName ) . toBe ( 'DIV' ) ;
165
174
} ) ;
@@ -183,7 +192,10 @@ describe('ReactDOMLegacyFiber', () => {
183
192
184
193
expect ( container . childNodes . length ) . toBe ( 2 ) ;
185
194
186
- const firstNode = ReactDOM . findDOMNode ( instance ) ;
195
+ const firstNode =
196
+ ReactDOM . __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED . findDOMNode (
197
+ instance ,
198
+ ) ;
187
199
expect ( firstNode ) . toBe ( container . firstChild ) ;
188
200
expect ( firstNode . tagName ) . toBe ( 'DIV' ) ;
189
201
} ) ;
@@ -878,13 +890,19 @@ describe('ReactDOMLegacyFiber', () => {
878
890
}
879
891
880
892
const myNodeA = ReactDOM . render ( < MyNode /> , container ) ;
881
- const a = ReactDOM . findDOMNode ( myNodeA ) ;
893
+ const a =
894
+ ReactDOM . __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED . findDOMNode (
895
+ myNodeA ,
896
+ ) ;
882
897
expect ( a . tagName ) . toBe ( 'DIV' ) ;
883
898
884
899
const myNodeB = ReactDOM . render ( < MyNode flag = { true } /> , container ) ;
885
900
expect ( myNodeA === myNodeB ) . toBe ( true ) ;
886
901
887
- const b = ReactDOM . findDOMNode ( myNodeB ) ;
902
+ const b =
903
+ ReactDOM . __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED . findDOMNode (
904
+ myNodeB ,
905
+ ) ;
888
906
expect ( b . tagName ) . toBe ( 'SPAN' ) ;
889
907
} ) ;
890
908
0 commit comments