wip: trying to make tests work
This commit is contained in:
@@ -109,7 +109,8 @@ export interface ComponentInstance<P = {}, D = {}>
|
||||
// actual implementation of the component
|
||||
class InternalComponent implements PublicInstanceMethods {
|
||||
get $el(): any {
|
||||
return this.$vnode && this.$vnode.el
|
||||
const el = this.$vnode && this.$vnode.el
|
||||
return typeof el === 'function' ? (el as any)() : el
|
||||
}
|
||||
|
||||
$vnode: VNode | null = null
|
||||
|
||||
@@ -228,13 +228,9 @@ export function createRenderer(options: RendererOptions) {
|
||||
// kept-alive
|
||||
activateComponentInstance(vnode, container, endNode)
|
||||
} else {
|
||||
if (__JSDOM__) {
|
||||
queueJob(() => {
|
||||
mountComponentInstance(vnode, container, isSVG, endNode)
|
||||
} else {
|
||||
queueJob(() => {
|
||||
mountComponentInstance(vnode, container, isSVG, endNode)
|
||||
}, flushHooks)
|
||||
}
|
||||
}, flushHooks)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1441,7 +1437,6 @@ export function createRenderer(options: RendererOptions) {
|
||||
}
|
||||
}
|
||||
return nextTick(() => {
|
||||
debugger
|
||||
return vnode && vnode.flags & VNodeFlags.COMPONENT_STATEFUL
|
||||
? (vnode.children as ComponentInstance).$proxy
|
||||
: null
|
||||
|
||||
Reference in New Issue
Block a user