@@ -143,7 +143,7 @@ async function testHydration(
143143 }
144144
145145 app . mount ( container )
146- return { data, container }
146+ return { data, container, html }
147147}
148148
149149const triggerEvent = ( type : string , el : Element ) => {
@@ -331,6 +331,41 @@ describe('Vapor Mode hydration', () => {
331331 expect ( `mismatch in <div>` ) . not . toHaveBeenWarned ( )
332332 } )
333333
334+ test ( 'plain element fallback hydrates unresolved lowercase tag' , async ( ) => {
335+ const code = `
336+ <template>
337+ <center><span>{{ data }}</span></center>
338+ <span>after</span>
339+ </template>
340+ `
341+ const { container, data, html } = await testHydration ( code )
342+ expect ( formatHtml ( html ) ) . toMatchInlineSnapshot (
343+ `
344+ "
345+ <!--[--><center><span>foo</span></center><span>after</span><!--]-->
346+ "
347+ ` ,
348+ )
349+ expect ( formatHtml ( container . innerHTML ) ) . toMatchInlineSnapshot (
350+ `
351+ "
352+ <!--[--><center><span>foo</span></center><span>after</span><!--]-->
353+ "
354+ ` ,
355+ )
356+ data . value = 'bar'
357+ await nextTick ( )
358+ expect ( formatHtml ( container . innerHTML ) ) . toMatchInlineSnapshot (
359+ `
360+ "
361+ <!--[--><center><span>bar</span></center><span>after</span><!--]-->
362+ "
363+ ` ,
364+ )
365+ expect ( `Failed to resolve component: center` ) . toHaveBeenWarned ( )
366+ expect ( `Hydration node mismatch` ) . not . toHaveBeenWarned ( )
367+ } )
368+
334369 test ( 'element with binding and text children' , async ( ) => {
335370 const { container, data } = await testHydration ( `
336371 <template><div :class="data">{{ data }}</div></template>
0 commit comments