test: tests for lifecycle api

This commit is contained in:
Evan You
2019-08-28 12:13:36 -04:00
parent 2b6ca9a7b6
commit b40b7356ef
5 changed files with 349 additions and 31 deletions

View File

@@ -162,14 +162,14 @@ export function createComponent(options: any) {
}
export function createComponentInstance(
type: any,
vnode: VNode,
parent: ComponentInstance | null
): ComponentInstance {
const instance = {
type,
vnode,
parent,
type: vnode.type as any,
root: null as any, // set later so it can point to itself
vnode: null as any,
next: null,
subTree: null as any,
update: null as any,