diff --git a/packages/react-dom/src/__tests__/refs-destruction-test.js b/packages/react-dom/src/__tests__/refs-destruction-test.js
index 97009c9e77806..a500b4b24b38c 100644
--- a/packages/react-dom/src/__tests__/refs-destruction-test.js
+++ b/packages/react-dom/src/__tests__/refs-destruction-test.js
@@ -12,7 +12,6 @@
let React;
let ReactDOM;
let ReactDOMClient;
-let ReactTestUtils;
let TestComponent;
let act;
let theInnerDivRef;
@@ -25,7 +24,6 @@ describe('refs-destruction', () => {
React = require('react');
ReactDOM = require('react-dom');
ReactDOMClient = require('react-dom/client');
- ReactTestUtils = require('react-dom/test-utils');
act = require('internal-test-utils').act;
class ClassComponent extends React.Component {
@@ -75,7 +73,7 @@ describe('refs-destruction', () => {
root.render();
});
- expect(ReactTestUtils.isDOMComponent(theInnerDivRef.current)).toBe(true);
+ expect(theInnerDivRef.current).toBeInstanceOf(Element);
expect(theInnerClassComponentRef.current).toBeTruthy();
root.unmount();
@@ -91,7 +89,7 @@ describe('refs-destruction', () => {
root.render();
});
- expect(ReactTestUtils.isDOMComponent(theInnerDivRef.current)).toBe(true);
+ expect(theInnerDivRef.current).toBeInstanceOf(Element);
expect(theInnerClassComponentRef.current).toBeTruthy();
await act(async () => {
@@ -109,7 +107,7 @@ describe('refs-destruction', () => {
root.render();
});
- expect(ReactTestUtils.isDOMComponent(theInnerDivRef.current)).toBe(true);
+ expect(theInnerDivRef.current).toBeInstanceOf(Element);
expect(theInnerClassComponentRef.current).toBeTruthy();
await act(async () => {