mirror of https://github.com/vuejs/core.git
wip(vapor): test cases
This commit is contained in:
parent
2a76b52d7f
commit
e5e4d295ba
|
@ -243,21 +243,45 @@ describe('Vapor Mode hydration', () => {
|
||||||
test.todo('component with anchor insertion', async () => {
|
test.todo('component with anchor insertion', async () => {
|
||||||
const { container, data } = await testHydration(
|
const { container, data } = await testHydration(
|
||||||
`
|
`
|
||||||
<template><div><span/><components.Child/><span/></div></template>
|
<template>
|
||||||
|
<div>
|
||||||
|
<span/>
|
||||||
|
<components.Child/>
|
||||||
|
<span/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
`,
|
`,
|
||||||
{
|
{
|
||||||
Child: `<template>{{ data }}</template>`,
|
Child: `<template>{{ data }}</template>`,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
expect(container.innerHTML).toMatchInlineSnapshot(
|
expect(container.innerHTML).toMatchInlineSnapshot()
|
||||||
`"<div><span></span>foo<span></span></div>"`,
|
|
||||||
)
|
|
||||||
|
|
||||||
data.value = 'bar'
|
data.value = 'bar'
|
||||||
await nextTick()
|
await nextTick()
|
||||||
expect(container.innerHTML).toMatchInlineSnapshot(
|
expect(container.innerHTML).toMatchInlineSnapshot()
|
||||||
`"<div><span></span>foo<span></span></div>"`,
|
})
|
||||||
|
|
||||||
|
test.todo('consecutive component with anchor insertion', async () => {
|
||||||
|
const { container, data } = await testHydration(
|
||||||
|
`<template>
|
||||||
|
<div>
|
||||||
|
<span/>
|
||||||
|
<components.Child/>
|
||||||
|
<components.Child/>
|
||||||
|
<span/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
`,
|
||||||
|
{
|
||||||
|
Child: `<template>{{ data }}</template>`,
|
||||||
|
},
|
||||||
)
|
)
|
||||||
|
expect(container.innerHTML).toMatchInlineSnapshot()
|
||||||
|
|
||||||
|
data.value = 'bar'
|
||||||
|
await nextTick()
|
||||||
|
expect(container.innerHTML).toMatchInlineSnapshot()
|
||||||
})
|
})
|
||||||
|
|
||||||
test.todo('if')
|
test.todo('if')
|
||||||
|
|
Loading…
Reference in New Issue