diff --git a/packages/react-devtools-shared/src/__tests__/profilerChangeDescriptions-test.js b/packages/react-devtools-shared/src/__tests__/profilerChangeDescriptions-test.js
index 3536034d9f748..cf5304664b815 100644
--- a/packages/react-devtools-shared/src/__tests__/profilerChangeDescriptions-test.js
+++ b/packages/react-devtools-shared/src/__tests__/profilerChangeDescriptions-test.js
@@ -7,9 +7,10 @@
* @flow
*/
+import {getVersionedRenderImplementation} from './utils';
+
describe('Profiler change descriptions', () => {
let React;
- let legacyRender;
let store;
let utils;
@@ -17,8 +18,6 @@ describe('Profiler change descriptions', () => {
utils = require('./utils');
utils.beforeEachProfiling();
- legacyRender = utils.legacyRender;
-
store = global.store;
store.collapseNodesByDefault = false;
store.recordChangeDescriptions = true;
@@ -26,6 +25,8 @@ describe('Profiler change descriptions', () => {
React = require('react');
});
+ const {render} = getVersionedRenderImplementation();
+
// @reactVersion >=18.0
it('should identify useContext as the cause for a re-render', () => {
const Context = React.createContext(0);
@@ -62,10 +63,8 @@ describe('Profiler change descriptions', () => {
);
};
- const container = document.createElement('div');
-
utils.act(() => store.profilerStore.startProfiling());
- utils.act(() => legacyRender(, container));
+ utils.act(() => render());
utils.act(() => forceUpdate());
utils.act(() => store.profilerStore.stopProfiling());