Unverified Commit 982392e1 authored by Jiachi Liu's avatar Jiachi Liu Committed by GitHub

test: fix flaky tests for hydration error with 18.3 (#71260)

parent f853f107
......@@ -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) {
......
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