Skip to content

Commit c3e5730

Browse files
authored
test: fix flaky test (#98)
1 parent 6097795 commit c3e5730

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

playground/ssr-react/__tests__/ssr-react.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ test('/', async () => {
5050
})
5151

5252
test('hmr', async () => {
53-
await page.goto(url)
53+
await untilBrowserLogAfter(() => page.goto(url), 'hydrated')
54+
5455
editFile('src/pages/Home.jsx', (code) =>
5556
code.replace('<h1>Home', '<h1>changed'),
5657
)
@@ -70,7 +71,8 @@ test('client navigation', async () => {
7071
})
7172

7273
test(`circular dependencies modules doesn't throw`, async () => {
73-
await page.goto(url)
74+
await untilBrowserLogAfter(() => page.goto(url), 'hydrated')
75+
7476
expect(await page.textContent('.circ-dep-init')).toMatch(
7577
'circ-dep-init-a circ-dep-init-b',
7678
)

0 commit comments

Comments
 (0)