File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2924,14 +2924,18 @@ describe('lazy import components', () => {
29242924 } )
29252925
29262926 it ( 'handles time-based hydration correctly' , async ( ) => {
2927- const { page } = await renderPage ( '/lazy-import-components/time' )
2928-
29292927 const unhydratedText = 'This is not mounted.'
2930- const hydratedText = 'This is mounted.'
2928+ const html = await $fetch < string > ( '/lazy-import-components/time' )
2929+ expect ( html ) . toContain ( unhydratedText )
2930+
2931+ const { page, consoleLogs } = await renderPage ( '/lazy-import-components/time' )
29312932
2932- await page . locator ( '[data-testid=hydrate-after]' , { hasText : unhydratedText } ) . waitFor ( { state : 'visible' } )
2933+ const hydratedText = 'This is mounted.'
29332934 await page . locator ( '[data-testid=hydrate-after]' , { hasText : hydratedText } ) . waitFor ( { state : 'visible' } )
29342935
2936+ const hydrationLogs = consoleLogs . filter ( log => log . type !== 'warn' )
2937+ expect ( hydrationLogs . map ( log => log . text ) ) . toEqual ( [ ] )
2938+
29352939 await page . close ( )
29362940 } )
29372941
You can’t perform that action at this time.
0 commit comments