diff --git a/packages/compiler-ssr/__tests__/ssrComponent.spec.ts b/packages/compiler-ssr/__tests__/ssrComponent.spec.ts
index 2f279c09..24b926f8 100644
--- a/packages/compiler-ssr/__tests__/ssrComponent.spec.ts
+++ b/packages/compiler-ssr/__tests__/ssrComponent.spec.ts
@@ -367,94 +367,6 @@ describe('ssr: components', () => {
`)
})
})
-
- // transition-group should flatten and concat its children fragments into
- // a single one
- describe('transition-group', () => {
- test('basic', () => {
- expect(
- compile(
- ``
- ).code
- ).toMatchInlineSnapshot(`
- "const { ssrRenderList: _ssrRenderList } = require(\\"vue/server-renderer\\")
-
- return function ssrRender(_ctx, _push, _parent, _attrs) {
- _push(\`\`)
- _ssrRenderList(_ctx.list, (i) => {
- _push(\`
\`)
- })
- _push(\`\`)
- }"
- `)
- })
-
- test('with static tag', () => {
- expect(
- compile(
- ``
- ).code
- ).toMatchInlineSnapshot(`
- "const { ssrRenderList: _ssrRenderList } = require(\\"vue/server-renderer\\")
-
- return function ssrRender(_ctx, _push, _parent, _attrs) {
- _push(\`\`)
- _ssrRenderList(_ctx.list, (i) => {
- _push(\`\`)
- })
- _push(\`
\`)
- }"
- `)
- })
-
- test('with dynamic tag', () => {
- expect(
- compile(
- ``
- ).code
- ).toMatchInlineSnapshot(`
- "const { ssrRenderList: _ssrRenderList } = require(\\"vue/server-renderer\\")
-
- return function ssrRender(_ctx, _push, _parent, _attrs) {
- _push(\`<\${_ctx.someTag}>\`)
- _ssrRenderList(_ctx.list, (i) => {
- _push(\`\`)
- })
- _push(\`\${_ctx.someTag}>\`)
- }"
- `)
- })
-
- test('with multi fragments children', () => {
- expect(
- compile(
- `
-
-
- ok
- `
- ).code
- ).toMatchInlineSnapshot(`
- "const { ssrRenderList: _ssrRenderList } = require(\\"vue/server-renderer\\")
-
- return function ssrRender(_ctx, _push, _parent, _attrs) {
- _push(\`\`)
- _ssrRenderList(10, (i) => {
- _push(\`\`)
- })
- _ssrRenderList(10, (i) => {
- _push(\`\`)
- })
- if (_ctx.ok) {
- _push(\`ok
\`)
- } else {
- _push(\`\`)
- }
- _push(\`\`)
- }"
- `)
- })
- })
})
describe('custom directive', () => {
diff --git a/packages/compiler-ssr/__tests__/ssrTransitionGroup.spec.ts b/packages/compiler-ssr/__tests__/ssrTransitionGroup.spec.ts
new file mode 100644
index 00000000..aee771fb
--- /dev/null
+++ b/packages/compiler-ssr/__tests__/ssrTransitionGroup.spec.ts
@@ -0,0 +1,88 @@
+import { compile } from '../src'
+
+// transition-group should flatten and concat its children fragments into
+// a single one
+describe('transition-group', () => {
+ test('basic', () => {
+ expect(
+ compile(``)
+ .code
+ ).toMatchInlineSnapshot(`
+ "const { ssrRenderList: _ssrRenderList } = require(\\"vue/server-renderer\\")
+
+ return function ssrRender(_ctx, _push, _parent, _attrs) {
+ _push(\`\`)
+ _ssrRenderList(_ctx.list, (i) => {
+ _push(\`\`)
+ })
+ _push(\`\`)
+ }"
+ `)
+ })
+
+ test('with static tag', () => {
+ expect(
+ compile(
+ ``
+ ).code
+ ).toMatchInlineSnapshot(`
+ "const { ssrRenderList: _ssrRenderList } = require(\\"vue/server-renderer\\")
+
+ return function ssrRender(_ctx, _push, _parent, _attrs) {
+ _push(\`\`)
+ _ssrRenderList(_ctx.list, (i) => {
+ _push(\`\`)
+ })
+ _push(\`
\`)
+ }"
+ `)
+ })
+
+ test('with dynamic tag', () => {
+ expect(
+ compile(
+ ``
+ ).code
+ ).toMatchInlineSnapshot(`
+ "const { ssrRenderList: _ssrRenderList } = require(\\"vue/server-renderer\\")
+
+ return function ssrRender(_ctx, _push, _parent, _attrs) {
+ _push(\`<\${_ctx.someTag}>\`)
+ _ssrRenderList(_ctx.list, (i) => {
+ _push(\`\`)
+ })
+ _push(\`\${_ctx.someTag}>\`)
+ }"
+ `)
+ })
+
+ test('with multi fragments children', () => {
+ expect(
+ compile(
+ `
+
+
+ ok
+ `
+ ).code
+ ).toMatchInlineSnapshot(`
+ "const { ssrRenderList: _ssrRenderList } = require(\\"vue/server-renderer\\")
+
+ return function ssrRender(_ctx, _push, _parent, _attrs) {
+ _push(\`\`)
+ _ssrRenderList(10, (i) => {
+ _push(\`\`)
+ })
+ _ssrRenderList(10, (i) => {
+ _push(\`\`)
+ })
+ if (_ctx.ok) {
+ _push(\`ok
\`)
+ } else {
+ _push(\`\`)
+ }
+ _push(\`\`)
+ }"
+ `)
+ })
+})