File tree 2 files changed +4
-1
lines changed
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ export class VueWrapper<
213
213
}
214
214
}
215
215
216
- get element ( ) : Element {
216
+ get element ( ) : T [ '$el' ] {
217
217
// if the component has multiple root elements, we use the parent's element
218
218
return this . hasMultipleRoots ? this . parentElement : this . vm . $el
219
219
}
Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ const domWrapper = wrapper.find('#other')
14
14
let inputMaybe = wrapper . find ( 'input' )
15
15
expectType < HTMLInputElement | undefined > ( inputMaybe . element )
16
16
17
+ let buttonComp = mount ( defineComponent ( { template : '<button>Click me</button>' } ) )
18
+ expectType < HTMLButtonElement > ( buttonComp . element )
19
+
17
20
// SVG element selector
18
21
let lineMaybe = wrapper . find ( 'line' )
19
22
expectType < SVGLineElement | undefined > ( lineMaybe . element )
You can’t perform that action at this time.
0 commit comments