Skip to content

fix(types): allow all elements #175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import {queries, EventType, BoundFunctions} from '@testing-library/dom'
export * from '@testing-library/dom'

export interface RenderResult extends BoundFunctions<typeof queries> {
container: HTMLElement
baseElement: HTMLElement
container: Element
baseElement: Element
debug: (
baseElement?:
| HTMLElement
| Element
| DocumentFragment
| Array<HTMLElement | DocumentFragment>,
| Array<Element | DocumentFragment>,
maxLength?: number,
options?: PrettyFormatOptions,
) => void
Expand All @@ -36,8 +36,8 @@ export interface RenderOptions<V extends Vue, S = {}>
props?: object
store?: StoreOptions<S>
routes?: RouteConfig[]
container?: HTMLElement
baseElement?: HTMLElement
container?: Element
baseElement?: Element
}

export type ConfigurationCallback<V extends Vue> = (
Expand Down Expand Up @@ -68,7 +68,7 @@ export interface VueFireEventObject extends AsyncFireObject {
element: HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement,
value: string,
): Promise<void>
update(element: HTMLElement, value?: string): Promise<void>
update(element: Element, value?: string): Promise<void>
}

export const fireEvent: VueFireEventObject
2 changes: 1 addition & 1 deletion types/test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Vue from 'vue'
import {render, fireEvent, screen, waitFor} from '@testing-library/vue'

declare const elem: HTMLElement
declare const elem: Element

const SomeComponent = Vue.extend({
name: 'SomeComponent',
Expand Down