diff --git a/tests/shared/imageTest.tsx b/tests/shared/imageTest.tsx index 65a26b519b..317872e190 100644 --- a/tests/shared/imageTest.tsx +++ b/tests/shared/imageTest.tsx @@ -35,11 +35,14 @@ export default function imageTest(component: React.ReactElement) { await page.addStyleTag({ path: `${process.cwd()}/dist/reset.css` }); const cache = createCache(); - const html = ReactDOMServer.renderToString( + + const element = ( - {component}, - , + {component} + ); + + const html = ReactDOMServer.renderToString(element); const styleStr = extractStyle(cache); await page.evaluate(