Unverified Commit 97532172 authored by Sebastian "Sebbie" Silbermann's avatar Sebastian "Sebbie" Silbermann Committed by GitHub

[test] Deflake…

[test] Deflake `test/development/app-dir/hydration-error-count/hydration-error-count.test.ts` (#88749)
parent e1685de2
......@@ -334,11 +334,11 @@ describe('hydration-error-count', () => {
it('should display runtime error separately from hydration errors', async () => {
const browser = await next.browser('/hydration-with-runtime-errors')
if (process.env.__NEXT_CACHE_COMPONENTS) {
await expect(browser).toDisplayRedbox(`
[
{
"componentStack": "...
await expect(browser).toDisplayRedbox(`
[
{
"componentStack": "...
<Next.js Internal Component>
<Next.js Internal Component>
<Next.js Internal Component>
<Next.js Internal Component>
......@@ -349,55 +349,49 @@ describe('hydration-error-count', () => {
<Next.js Internal Component>
<Next.js Internal Component>
<Next.js Internal Component>
<Next.js Internal Component>
<Next.js Internal Component>
<Page params={Promise} searchParams={Promise}>
> <p>
> <p>
...
<Next.js Internal Component>
<Page params={Promise} searchParams={Promise}>
> <p>
> <p>
...
...",
"description": "In HTML, <p> cannot be a descendant of <p>.
This will cause a hydration error.",
"environmentLabel": null,
"label": "Console Error",
"source": "app/hydration-with-runtime-errors/page.tsx (12:14) @ Page
> 12 | sneaky <p>very sneaky</p>
| ^",
"stack": [
"p <anonymous>",
"Page app/hydration-with-runtime-errors/page.tsx (12:14)",
],
},
{
"description": "Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:",
"environmentLabel": null,
"label": "Recoverable Error",
"source": "app/hydration-with-runtime-errors/page.tsx (12:14) @ Page
> 12 | sneaky <p>very sneaky</p>
| ^",
"stack": [
"p <anonymous>",
"Page app/hydration-with-runtime-errors/page.tsx (12:14)",
],
},
{
"description": "runtime error",
"environmentLabel": null,
"label": "Runtime Error",
"source": "app/hydration-with-runtime-errors/page.tsx (7:11) @ Page.useEffect
> 7 | throw new Error('runtime error')
| ^",
"stack": [
"Page.useEffect app/hydration-with-runtime-errors/page.tsx (7:11)",
],
},
]
`)
} else {
await expect(browser).toDisplayCollapsedRedbox(
`"Redbox is already open. Use \`toDisplayRedbox\` instead."`
)
}
...
...",
"description": "In HTML, <p> cannot be a descendant of <p>.
This will cause a hydration error.",
"environmentLabel": null,
"label": "Console Error",
"source": "app/hydration-with-runtime-errors/page.tsx (12:14) @ Page
> 12 | sneaky <p>very sneaky</p>
| ^",
"stack": [
"p <anonymous>",
"Page app/hydration-with-runtime-errors/page.tsx (12:14)",
],
},
{
"description": "Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:",
"environmentLabel": null,
"label": "Recoverable Error",
"source": "app/hydration-with-runtime-errors/page.tsx (12:14) @ Page
> 12 | sneaky <p>very sneaky</p>
| ^",
"stack": [
"p <anonymous>",
"Page app/hydration-with-runtime-errors/page.tsx (12:14)",
],
},
{
"description": "runtime error",
"environmentLabel": null,
"label": "Runtime Error",
"source": "app/hydration-with-runtime-errors/page.tsx (7:11) @ Page.useEffect
> 7 | throw new Error('runtime error')
| ^",
"stack": [
"Page.useEffect app/hydration-with-runtime-errors/page.tsx (7:11)",
],
},
]
`)
})
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment