diff --git a/packages/element/src/test/create-interpolate-element.js b/packages/element/src/test/create-interpolate-element.js
index 510c869e8c86b..b8c5d4757e1cb 100644
--- a/packages/element/src/test/create-interpolate-element.js
+++ b/packages/element/src/test/create-interpolate-element.js
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
-import TestRenderer, { act } from 'react-test-renderer';
+import { render } from '@testing-library/react';
/**
* Internal dependencies
@@ -207,19 +207,17 @@ describe( 'createInterpolateElement', () => {
);
};
- let renderer;
- act( () => {
- renderer = TestRenderer.create(
-
- );
- } );
- expect( () => renderer.root.findByType( 'em' ) ).not.toThrow();
- expect( () => renderer.root.findByType( 'strong' ) ).toThrow();
- act( () => {
- renderer.update( );
- } );
- expect( () => renderer.root.findByType( 'strong' ) ).not.toThrow();
- expect( () => renderer.root.findByType( 'em' ) ).toThrow();
+ const { container, rerender } = render( );
+
+ expect( container.firstChild ).toContainHTML( 'string!' );
+ expect( container.firstChild ).not.toContainHTML( '' );
+
+ rerender( );
+
+ expect( container.firstChild ).toContainHTML(
+ 'string!'
+ );
+ expect( container.firstChild ).not.toContainHTML( '' );
} );
it( 'handles parsing emojii correctly', () => {
const testString = '👳♀️🚨🤷♂️⛈️fully here';