MCPcopy Create free account
hub / github.com/vuejs/test-utils / getCurrentComponent

Method getCurrentComponent

src/domWrapper.ts:38–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36 }
37
38 getCurrentComponent() {
39 let component = this.element.__vueParentComponent
40 while (component?.parent?.vnode.el === this.element) {
41 component = component.parent
42 }
43 return component
44 }
45
46 find<K extends keyof HTMLElementTagNameMap>(
47 selector: K

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected