File tree 1 file changed +30
-6
lines changed
packages/runtime-vapor/__tests__
1 file changed +30
-6
lines changed Original file line number Diff line number Diff line change @@ -243,21 +243,45 @@ describe('Vapor Mode hydration', () => {
243
243
test . todo ( 'component with anchor insertion' , async ( ) => {
244
244
const { container, data } = await testHydration (
245
245
`
246
- <template><div><span/><components.Child/><span/></div></template>
246
+ <template>
247
+ <div>
248
+ <span/>
249
+ <components.Child/>
250
+ <span/>
251
+ </div>
252
+ </template>
247
253
` ,
248
254
{
249
255
Child : `<template>{{ data }}</template>` ,
250
256
} ,
251
257
)
252
- expect ( container . innerHTML ) . toMatchInlineSnapshot (
253
- `"<div><span></span>foo<span></span></div>"` ,
254
- )
258
+ expect ( container . innerHTML ) . toMatchInlineSnapshot ( )
255
259
256
260
data . value = 'bar'
257
261
await nextTick ( )
258
- expect ( container . innerHTML ) . toMatchInlineSnapshot (
259
- `"<div><span></span>foo<span></span></div>"` ,
262
+ expect ( container . innerHTML ) . toMatchInlineSnapshot ( )
263
+ } )
264
+
265
+ test . todo ( 'consecutive component with anchor insertion' , async ( ) => {
266
+ const { container, data } = await testHydration (
267
+ `<template>
268
+ <div>
269
+ <span/>
270
+ <components.Child/>
271
+ <components.Child/>
272
+ <span/>
273
+ </div>
274
+ </template>
275
+ ` ,
276
+ {
277
+ Child : `<template>{{ data }}</template>` ,
278
+ } ,
260
279
)
280
+ expect ( container . innerHTML ) . toMatchInlineSnapshot ( )
281
+
282
+ data . value = 'bar'
283
+ await nextTick ( )
284
+ expect ( container . innerHTML ) . toMatchInlineSnapshot ( )
261
285
} )
262
286
263
287
test . todo ( 'if' )
You can’t perform that action at this time.
0 commit comments