Skip to content

Commit d878e2a

Browse files
committed
test: tweak hydration mismatch test
1 parent 6fd98df commit d878e2a

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

packages/plugin-rsc/e2e/basic.test.ts

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -994,16 +994,17 @@ function defineTest(f: Fixture) {
994994
errors.push(error)
995995
})
996996
await page.goto(f.url('/?test-hydration-mismatch'))
997-
await waitForHydration(page)
998-
expect(errors).toMatchObject([
999-
{
1000-
message: expect.stringContaining(
1001-
f.mode === 'dev'
1002-
? `Hydration failed because the server rendered HTML didn't match the client.`
1003-
: `Minified React error #418`,
1004-
),
1005-
},
1006-
])
997+
await expect(() => {
998+
expect(errors).toMatchObject([
999+
{
1000+
message: expect.stringContaining(
1001+
f.mode === 'dev'
1002+
? `Hydration failed because the server rendered HTML didn't match the client.`
1003+
: `Minified React error #418`,
1004+
),
1005+
},
1006+
])
1007+
}).toPass()
10071008

10081009
errors.length = 0
10091010
await page.goto(f.url())

0 commit comments

Comments
 (0)