From 67901e78ef9d31809ea154f359f0512c5a913bf4 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Wed, 2 Jun 2021 14:14:42 +0200 Subject: [PATCH] test(ssr): add missing test for async component in slot --- test/ssr/ssr-string.spec.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/test/ssr/ssr-string.spec.js b/test/ssr/ssr-string.spec.js index 61abfce9a2f..b4f962872f5 100644 --- a/test/ssr/ssr-string.spec.js +++ b/test/ssr/ssr-string.spec.js @@ -694,6 +694,34 @@ describe('SSR: renderToString', () => { }) }) + // #11963, #10391 + it('renders async children passed in slots', done => { + const Parent = { + template: `
` + } + const Child = { + template: `

child

` + } + renderVmWithOptions({ + template: ` + + + + `, + components: { + Parent, + Child: () => Promise.resolve(Child) + } + }, result => { + expect(result).toContain( + `

child

` + ) + done() + }) + }) + it('everything together', done => { renderVmWithOptions({ template: `