Skip to content

Commit

Permalink
test(ssr): add missing test for async component in slot
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Jun 2, 2021
1 parent 1866033 commit 67901e7
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions test/ssr/ssr-string.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,34 @@ describe('SSR: renderToString', () => {
})
})

// #11963, #10391
it('renders async children passed in slots', done => {
const Parent = {
template: `<div><slot name="child"/></div>`
}
const Child = {
template: `<p>child</p>`
}
renderVmWithOptions({
template: `
<Parent>
<template #child>
<Child/>
</template>
</Parent>
`,
components: {
Parent,
Child: () => Promise.resolve(Child)
}
}, result => {
expect(result).toContain(
`<div data-server-rendered="true"><p>child</p></div>`
)
done()
})
})

it('everything together', done => {
renderVmWithOptions({
template: `
Expand Down

0 comments on commit 67901e7

Please sign in to comment.