@@ -106,15 +106,15 @@ describe('updaters', () => {
106
106
107
107
const Parent = ( ) => < Child /> ;
108
108
const Child = ( ) => null ;
109
- const container = document . createElement ( 'div' ) ;
109
+ const root = ReactDOMClient . createRoot ( document . createElement ( 'div' ) ) ;
110
110
111
111
await act ( ( ) => {
112
- ReactDOM . render ( < Parent /> , container ) ;
112
+ root . render ( < Parent /> ) ;
113
113
} ) ;
114
114
expect ( allSchedulerTags ) . toEqual ( [ [ HostRoot ] ] ) ;
115
115
116
116
await act ( ( ) => {
117
- ReactDOM . render ( < Parent /> , container ) ;
117
+ root . render ( < Parent /> ) ;
118
118
} ) ;
119
119
expect ( allSchedulerTags ) . toEqual ( [ [ HostRoot ] , [ HostRoot ] ] ) ;
120
120
} ) ;
@@ -141,8 +141,9 @@ describe('updaters', () => {
141
141
} ;
142
142
const Child = ( ) => null ;
143
143
144
+ const root = ReactDOMClient . createRoot ( document . createElement ( 'div' ) ) ;
144
145
await act ( ( ) => {
145
- ReactDOM . render ( < Parent /> , document . createElement ( 'div' ) ) ;
146
+ root . render ( < Parent /> ) ;
146
147
} ) ;
147
148
expect ( scheduleForA ) . not . toBeNull ( ) ;
148
149
expect ( scheduleForB ) . not . toBeNull ( ) ;
@@ -174,8 +175,9 @@ describe('updaters', () => {
174
175
}
175
176
const Child = ( ) => null ;
176
177
let instance ;
178
+ const root = ReactDOMClient . createRoot ( document . createElement ( 'div' ) ) ;
177
179
await act ( ( ) => {
178
- ReactDOM . render ( < Parent /> , document . createElement ( 'div' ) ) ;
180
+ root . render ( < Parent /> ) ;
179
181
} ) ;
180
182
expect ( allSchedulerTypes ) . toEqual ( [ [ null ] ] ) ;
181
183
0 commit comments