Skip to content

Commit

Permalink
test: fix flaky tests for hydration error with 18.3 (vercel#71260)
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi authored Oct 14, 2024
1 parent f853f10 commit 982392e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/development/acceptance/hydration-error.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,12 @@ describe('Error overlay for hydration errors in Pages router', () => {
)

await session.assertHasRedbox()
expect(await getRedboxTotalErrorCount(browser)).toBe(isReact18 ? 3 : 1)
const totalAmount = await getRedboxTotalErrorCount(browser)
if (isReact18) {
expect(totalAmount).toBeGreaterThanOrEqual(2)
} else {
expect(totalAmount).toBe(1)
}

const pseudoHtml = await session.getRedboxComponentStack()
if (isTurbopack) {
Expand Down

0 comments on commit 982392e

Please sign in to comment.