diff --git a/packages/compiler-ssr/__tests__/ssrComponent.spec.ts b/packages/compiler-ssr/__tests__/ssrComponent.spec.ts index 2fde4560ec4..fb2fff86574 100644 --- a/packages/compiler-ssr/__tests__/ssrComponent.spec.ts +++ b/packages/compiler-ssr/__tests__/ssrComponent.spec.ts @@ -39,6 +39,7 @@ describe('ssr: components', () => { return function ssrRender(_ctx, _push, _parent, _attrs) { _ssrRenderVNode(_push, _createVNode(_resolveDynamicComponent("foo"), _mergeProps({ prop: "b" }, _attrs), null), _parent) + _push(\`\`) }" `) @@ -49,6 +50,7 @@ describe('ssr: components', () => { return function ssrRender(_ctx, _push, _parent, _attrs) { _ssrRenderVNode(_push, _createVNode(_resolveDynamicComponent(_ctx.foo), _mergeProps({ prop: "b" }, _attrs), null), _parent) + _push(\`\`) }" `) }) @@ -244,7 +246,8 @@ describe('ssr: components', () => { _ssrRenderList(list, (i) => { _push(\`\`) }) - _push(\`\`) + _push(\`\`) + _push(\`\`) } else { _push(\`\`) } @@ -267,7 +270,8 @@ describe('ssr: components', () => { _ssrRenderList(_ctx.list, (i) => { _push(\`\`) }) - _push(\`\`) + _push(\`\`) + _push(\`\`) } else { _push(\`\`) } @@ -361,6 +365,7 @@ describe('ssr: components', () => { _push(\`\`) if (false) { _push(\`
\`) + _push(\`\`) } else { _push(\`\`) } diff --git a/packages/compiler-ssr/__tests__/ssrElement.spec.ts b/packages/compiler-ssr/__tests__/ssrElement.spec.ts index f1d509acfb0..d344405f3ed 100644 --- a/packages/compiler-ssr/__tests__/ssrElement.spec.ts +++ b/packages/compiler-ssr/__tests__/ssrElement.spec.ts @@ -396,4 +396,50 @@ describe('ssr: element', () => { `) }) }) + + describe('dynamic anchor', () => { + test('two consecutive components', () => { + expect( + getCompiledString(` +