Skip to content

Commit b2e00f0

Browse files
committed
test(ssr): test render function Transition usage in SSR
1 parent e8e9b00 commit b2e00f0

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

packages/server-renderer/__tests__/render.spec.ts

+11-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import {
99
createTextVNode,
1010
createStaticVNode,
1111
KeepAlive,
12-
withCtx
12+
withCtx,
13+
Transition
1314
} from 'vue'
1415
import { escapeHtml } from '@vue/shared'
1516
import { renderToString } from '../src/renderToString'
@@ -614,6 +615,15 @@ function testRender(type: string, render: typeof renderToString) {
614615
`<!--[--><p>hello</p><!--]-->`
615616
)
616617
})
618+
619+
test('Transition', async () => {
620+
const MyComp = {
621+
render: () => h('p', 'hello')
622+
}
623+
expect(await render(h(Transition, () => h(MyComp)))).toBe(
624+
`<p>hello</p>`
625+
)
626+
})
617627
})
618628

619629
describe('raw vnode types', () => {

0 commit comments

Comments
 (0)