2019-11-02 02:54:01 +00:00
|
|
|
import {
|
|
|
|
createRenderer,
|
|
|
|
VNode,
|
|
|
|
RootRenderFunction,
|
2020-01-23 20:05:38 +00:00
|
|
|
CreateAppFunction
|
2019-11-02 02:54:01 +00:00
|
|
|
} from '@vue/runtime-core'
|
2019-09-06 20:58:32 +00:00
|
|
|
import { nodeOps, TestNode, TestElement } from './nodeOps'
|
2019-06-20 13:28:37 +00:00
|
|
|
import { patchProp } from './patchProp'
|
2019-08-26 22:08:56 +00:00
|
|
|
import { serializeInner } from './serialize'
|
2018-10-01 17:15:07 +00:00
|
|
|
|
2019-11-02 02:54:01 +00:00
|
|
|
const { render: baseRender, createApp: baseCreateApp } = createRenderer({
|
2019-06-20 13:28:37 +00:00
|
|
|
patchProp,
|
|
|
|
...nodeOps
|
2019-09-06 20:58:32 +00:00
|
|
|
})
|
2019-09-02 20:09:34 +00:00
|
|
|
|
2019-11-02 02:54:01 +00:00
|
|
|
export const render = baseRender as RootRenderFunction<TestNode, TestElement>
|
2020-01-23 20:05:38 +00:00
|
|
|
export const createApp = baseCreateApp as CreateAppFunction<TestElement>
|
2018-10-17 21:36:34 +00:00
|
|
|
|
2019-08-26 22:08:56 +00:00
|
|
|
// convenience for one-off render validations
|
|
|
|
export function renderToString(vnode: VNode) {
|
|
|
|
const root = nodeOps.createElement('div')
|
|
|
|
render(vnode, root)
|
|
|
|
return serializeInner(root)
|
|
|
|
}
|
|
|
|
|
|
|
|
export * from './triggerEvent'
|
|
|
|
export * from './serialize'
|
2018-10-01 17:15:07 +00:00
|
|
|
export * from './nodeOps'
|
2018-10-26 19:44:50 +00:00
|
|
|
export * from '@vue/runtime-core'
|