diff --git a/packages/react-reconciler/src/__tests__/ReactUpdaters-test.internal.js b/packages/react-reconciler/src/__tests__/ReactUpdaters-test.internal.js
index 93e1d6937764d..1727a595365ef 100644
--- a/packages/react-reconciler/src/__tests__/ReactUpdaters-test.internal.js
+++ b/packages/react-reconciler/src/__tests__/ReactUpdaters-test.internal.js
@@ -106,15 +106,15 @@ describe('updaters', () => {
const Parent = () => ;
const Child = () => null;
- const container = document.createElement('div');
+ const root = ReactDOMClient.createRoot(document.createElement('div'));
await act(() => {
- ReactDOM.render(, container);
+ root.render();
});
expect(allSchedulerTags).toEqual([[HostRoot]]);
await act(() => {
- ReactDOM.render(, container);
+ root.render();
});
expect(allSchedulerTags).toEqual([[HostRoot], [HostRoot]]);
});
@@ -141,8 +141,9 @@ describe('updaters', () => {
};
const Child = () => null;
+ const root = ReactDOMClient.createRoot(document.createElement('div'));
await act(() => {
- ReactDOM.render(, document.createElement('div'));
+ root.render();
});
expect(scheduleForA).not.toBeNull();
expect(scheduleForB).not.toBeNull();
@@ -174,8 +175,9 @@ describe('updaters', () => {
}
const Child = () => null;
let instance;
+ const root = ReactDOMClient.createRoot(document.createElement('div'));
await act(() => {
- ReactDOM.render(, document.createElement('div'));
+ root.render();
});
expect(allSchedulerTypes).toEqual([[null]]);