diff --git a/packages/react-dom/src/__tests__/ReactDOMServerIntegrationHooks-test.js b/packages/react-dom/src/__tests__/ReactDOMServerIntegrationHooks-test.js
index ac98730d4b656..7e46bea5f93d9 100644
--- a/packages/react-dom/src/__tests__/ReactDOMServerIntegrationHooks-test.js
+++ b/packages/react-dom/src/__tests__/ReactDOMServerIntegrationHooks-test.js
@@ -73,8 +73,13 @@ function initModules() {
};
}
-const {resetModules, itRenders, itThrowsWhenRendering, serverRender} =
- ReactDOMServerIntegrationUtils(initModules);
+const {
+ resetModules,
+ itRenders,
+ itThrowsWhenRendering,
+ clientRenderOnBadMarkup,
+ serverRender,
+} = ReactDOMServerIntegrationUtils(initModules);
describe('ReactDOMServerHooks', () => {
beforeEach(() => {
@@ -422,8 +427,13 @@ describe('ReactDOMServerHooks', () => {
});
return 'hi';
}
- // TODO: fails due to render error retry
- const domNode = await render(, 1);
+ const domNode = await render(
+ ,
+ render === clientRenderOnBadMarkup
+ ? // On hydration mismatch we retry and therefore log the warning again.
+ 2
+ : 1,
+ );
expect(domNode.textContent).toEqual('hi');
});
@@ -436,8 +446,13 @@ describe('ReactDOMServerHooks', () => {
return value;
}
- // TODO: fails due to render error retry
- const domNode = await render(, 1);
+ const domNode = await render(
+ ,
+ render === clientRenderOnBadMarkup
+ ? // On hydration mismatch we retry and therefore log the warning again.
+ 2
+ : 1,
+ );
expect(domNode.textContent).toEqual('0');
});
});
@@ -860,11 +875,15 @@ describe('ReactDOMServerHooks', () => {
return ;
}
- // TODO: fails due to render error retry
- const domNode1 = await render(, 1);
+ const domNode1 = await render(
+ ,
+ render === clientRenderOnBadMarkup
+ ? // On hydration mismatch we retry and therefore log the warning again.
+ 2
+ : 1,
+ );
expect(domNode1.textContent).toEqual('42');
- // TODO: fails due to render error retry
const domNode2 = await render(, 1);
expect(domNode2.textContent).toEqual('42');
});