Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions playground/ssr-react/__tests__/ssr-react.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ test('/', async () => {
})

test('hmr', async () => {
await page.goto(url)
await untilBrowserLogAfter(() => page.goto(url), 'hydrated')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test should wait for hydration because HMR won't work before hydration like other tests.


editFile('src/pages/Home.jsx', (code) =>
code.replace('<h1>Home', '<h1>changed'),
)
Expand All @@ -70,7 +71,8 @@ test('client navigation', async () => {
})

test(`circular dependencies modules doesn't throw`, async () => {
await page.goto(url)
await untilBrowserLogAfter(() => page.goto(url), 'hydrated')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not necessary but I think it's better to call this to make all tests consistent.


expect(await page.textContent('.circ-dep-init')).toMatch(
'circ-dep-init-a circ-dep-init-b',
)
Expand Down