@@ -103,7 +103,10 @@ describe('ReactDOMLegacyFiber', () => {
103103 container ,
104104 ) ;
105105
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+ ) ;
107110 expect ( textNode ) . toBe ( container . firstChild ) ;
108111 expect ( textNode . nodeType ) . toBe ( 3 ) ;
109112 expect ( textNode . nodeValue ) . toBe ( 'foo' ) ;
@@ -121,7 +124,10 @@ describe('ReactDOMLegacyFiber', () => {
121124
122125 expect ( container . childNodes . length ) . toBe ( 2 ) ;
123126
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+ ) ;
125131 expect ( firstNode ) . toBe ( container . firstChild ) ;
126132 expect ( firstNode . tagName ) . toBe ( 'DIV' ) ;
127133 } ) ;
@@ -149,7 +155,10 @@ describe('ReactDOMLegacyFiber', () => {
149155
150156 expect ( container . childNodes . length ) . toBe ( 2 ) ;
151157
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+ ) ;
153162 expect ( firstNode ) . toBe ( container . firstChild ) ;
154163 expect ( firstNode . tagName ) . toBe ( 'DIV' ) ;
155164 } ) ;
@@ -172,7 +181,10 @@ describe('ReactDOMLegacyFiber', () => {
172181
173182 expect ( container . childNodes . length ) . toBe ( 2 ) ;
174183
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+ ) ;
176188 expect ( firstNode ) . toBe ( container . firstChild ) ;
177189 expect ( firstNode . tagName ) . toBe ( 'DIV' ) ;
178190 } ) ;
@@ -849,13 +861,19 @@ describe('ReactDOMLegacyFiber', () => {
849861 }
850862
851863 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+ ) ;
853868 expect ( a . tagName ) . toBe ( 'DIV' ) ;
854869
855870 const myNodeB = ReactDOM . render ( < MyNode flag = { true } /> , container ) ;
856871 expect ( myNodeA === myNodeB ) . toBe ( true ) ;
857872
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+ ) ;
859877 expect ( b . tagName ) . toBe ( 'SPAN' ) ;
860878 } ) ;
861879
0 commit comments