test(ssr): test render function Transition usage in SSR
This commit is contained in:
parent
e8e9b00f81
commit
b2e00f011a
@ -9,7 +9,8 @@ import {
|
||||
createTextVNode,
|
||||
createStaticVNode,
|
||||
KeepAlive,
|
||||
withCtx
|
||||
withCtx,
|
||||
Transition
|
||||
} from 'vue'
|
||||
import { escapeHtml } from '@vue/shared'
|
||||
import { renderToString } from '../src/renderToString'
|
||||
@ -614,6 +615,15 @@ function testRender(type: string, render: typeof renderToString) {
|
||||
`<!--[--><p>hello</p><!--]-->`
|
||||
)
|
||||
})
|
||||
|
||||
test('Transition', async () => {
|
||||
const MyComp = {
|
||||
render: () => h('p', 'hello')
|
||||
}
|
||||
expect(await render(h(Transition, () => h(MyComp)))).toBe(
|
||||
`<p>hello</p>`
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
describe('raw vnode types', () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user