Skip to content

Commit

Permalink
Poke
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Feb 21, 2025
1 parent 9466a87 commit 35d90f1
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions test/development/acceptance/hydration-error.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -483,12 +483,16 @@ describe('Error overlay for hydration errors in Pages router', () => {
)
const { browser } = sandbox

await retry(async () => {
expect(await getRedboxTotalErrorCount(browser)).toBe(isReact18 ? 3 : 1)
})

if (isReact18) {
await expect(browser).toDisplayRedbox(`
{
"componentStack": "<Page>
> <table>",
"count": 2,
"count": 3,
"description": "Expected server HTML to contain a matching <table> in <div>.",
"environmentLabel": null,
"label": "Unhandled Runtime Error",
Expand Down Expand Up @@ -548,14 +552,19 @@ describe('Error overlay for hydration errors in Pages router', () => {
])
)
const { browser } = sandbox

await retry(async () => {
expect(await getRedboxTotalErrorCount(browser)).toBe(isReact18 ? 3 : 1)
})

if (isReact18) {
await expect(browser).toDisplayRedbox(`
{
"componentStack": "<Mismatch>
> <div>
<Suspense>
> <main>",
"count": 2,
"count": 3,
"description": "Expected server HTML to contain a matching <main> in <div>.",
"environmentLabel": null,
"label": "Unhandled Runtime Error",
Expand Down

0 comments on commit 35d90f1

Please sign in to comment.