@@ -241,8 +241,7 @@ describe('Vapor Mode hydration', () => {
241241
242242 test ( 'component with anchor insertion' , async ( ) => {
243243 const { container, data } = await testHydration (
244- `
245- <template>
244+ `<template>
246245 <div>
247246 <span/>
248247 <components.Child/>
@@ -255,13 +254,13 @@ describe('Vapor Mode hydration', () => {
255254 } ,
256255 )
257256 expect ( container . innerHTML ) . toMatchInlineSnapshot (
258- `"<div><span></span><!--[[--> foo<!--]]--> <span></span></div>"` ,
257+ `"<div><span></span>foo<span></span></div>"` ,
259258 )
260259
261260 data . value = 'bar'
262261 await nextTick ( )
263262 expect ( container . innerHTML ) . toMatchInlineSnapshot (
264- `"<div><span></span><!--[[--> bar<!--]]--> <span></span></div>"` ,
263+ `"<div><span></span>bar<span></span></div>"` ,
265264 )
266265 } )
267266
@@ -291,6 +290,56 @@ describe('Vapor Mode hydration', () => {
291290 )
292291 } )
293292
293+ test ( 'mixed component and element with anchor insertion' , async ( ) => {
294+ const { container, data } = await testHydration (
295+ `<template>
296+ <div>
297+ <span/>
298+ <components.Child/>
299+ <span/>
300+ <components.Child/>
301+ <span/>
302+ </div>
303+ </template>
304+ ` ,
305+ {
306+ Child : `<template>{{ data }}</template>` ,
307+ } ,
308+ )
309+ expect ( container . innerHTML ) . toMatchInlineSnapshot (
310+ `"<div><span></span>foo<span></span>foo<span></span></div>"` ,
311+ )
312+
313+ data . value = 'bar'
314+ await nextTick ( )
315+ expect ( container . innerHTML ) . toMatchInlineSnapshot (
316+ `"<div><span></span>bar<span></span>bar<span></span></div>"` ,
317+ )
318+ } )
319+
320+ test . todo ( 'mixed component and text with anchor insertion' , async ( ) => {
321+ const { container, data } = await testHydration (
322+ `<template>
323+ <div>
324+ <span/>
325+ <components.Child/>
326+ {{ data }}
327+ <components.Child/>
328+ <span/>
329+ </div>
330+ </template>
331+ ` ,
332+ {
333+ Child : `<template>{{ data }}</template>` ,
334+ } ,
335+ )
336+ expect ( container . innerHTML ) . toMatchInlineSnapshot ( `` )
337+
338+ data . value = 'bar'
339+ await nextTick ( )
340+ expect ( container . innerHTML ) . toMatchInlineSnapshot ( `` )
341+ } )
342+
294343 test . todo ( 'if' )
295344
296345 test . todo ( 'for' )
0 commit comments