Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a5bd6cc

Browse files
fix(types): allow all elements (#175)
1 parent 8871d2f commit a5bd6cc

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

‎types/index.d.ts‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ import {queries, EventType, BoundFunctions} from '@testing-library/dom'
1212
export * from '@testing-library/dom'
1313

1414
export interface RenderResult extends BoundFunctions<typeof queries> {
15-
container: HTMLElement
16-
baseElement: HTMLElement
15+
container: Element
16+
baseElement: Element
1717
debug: (
1818
baseElement?:
19-
| HTMLElement
19+
| Element
2020
| DocumentFragment
21-
| Array<HTMLElement | DocumentFragment>,
21+
| Array<Element | DocumentFragment>,
2222
maxLength?: number,
2323
options?: PrettyFormatOptions,
2424
) => void
@@ -36,8 +36,8 @@ export interface RenderOptions<V extends Vue, S = {}>
3636
props?: object
3737
store?: StoreOptions<S>
3838
routes?: RouteConfig[]
39-
container?: HTMLElement
40-
baseElement?: HTMLElement
39+
container?: Element
40+
baseElement?: Element
4141
}
4242

4343
export type ConfigurationCallback<V extends Vue> = (
@@ -68,7 +68,7 @@ export interface VueFireEventObject extends AsyncFireObject {
6868
element: HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement,
6969
value: string,
7070
): Promise<void>
71-
update(element: HTMLElement, value?: string): Promise<void>
71+
update(element: Element, value?: string): Promise<void>
7272
}
7373

7474
export const fireEvent: VueFireEventObject

‎types/test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Vue from 'vue'
22
import {render, fireEvent, screen, waitFor} from '@testing-library/vue'
33

4-
declare const elem: HTMLElement
4+
declare const elem: Element
55

66
const SomeComponent = Vue.extend({
77
name: 'SomeComponent',

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /