You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'Warning: An error occurred during hydration. The server HTML was replaced with client content in <div>.',
199
+
'Expected server HTML to contain a matching <div> in <div>.',
200
+
],
201
+
{withoutStack: 1},
164
202
);
203
+
204
+
assertLog([
205
+
'Log recoverable error: Hydration failed because the initial UI does not match what was rendered on the server.',
206
+
'Log recoverable error: There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering.',
'Warning: An error occurred during hydration. The server HTML was replaced with client content in <div>.',
235
+
'Expected server HTML to contain a matching <div> in <div>.',
236
+
],
237
+
{withoutStack: 1},
183
238
);
239
+
240
+
assertLog([
241
+
'Log recoverable error: Hydration failed because the initial UI does not match what was rendered on the server.',
242
+
'Log recoverable error: There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering.',
243
+
]);
184
244
expect(container.textContent).toBe('parsnip');
185
245
});
186
246
187
-
it('should give helpful errors on state desync',()=>{
247
+
it('should give helpful errors on state desync',async()=>{
'Log recoverable error: Text content does not match server-rendered HTML.',
297
+
'Log recoverable error: There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering.',
'Warning: An error occurred during hydration. The server HTML was replaced with client content in <#document>.',
337
+
'Expected server HTML to contain a matching text node for "Hello world" in <body>',
338
+
],
339
+
{withoutStack: 1},
234
340
);
341
+
assertLog([
342
+
'Log recoverable error: Hydration failed because the initial UI does not match what was rendered on the server.',
343
+
'Log recoverable error: There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering.',
344
+
]);
235
345
}else{
236
346
// getTestDocument() has an extra <meta> that we didn't render.
'Warning: An error occurred during hydration. The server HTML was replaced with client content in <#document>.',
362
+
'Warning: Text content did not match. Server: "test doc" Client: "Hello World"',
363
+
],
364
+
{withoutStack: 1},
241
365
);
366
+
assertLog([
367
+
'Log recoverable error: Text content does not match server-rendered HTML.',
368
+
'Log recoverable error: There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering.',
0 commit comments