Skip to content

Commit addebad

Browse files
jgozgnapse
authored andcommitted
fix(TypeScript): Convert matchers to instance methods (#30)
* Convert matcher typings to instance methods * Allow RegExp in toHaveTextContent
1 parent dd6d4c6 commit addebad

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

extend-expect.d.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
declare namespace jest {
22
interface Matchers<R> {
3-
toBeInTheDOM: (container?: HTMLElement) => R
4-
toBeVisible: () => R
5-
toBeEmpty: () => R
6-
toContainElement: (element: HTMLElement) => R
7-
toHaveAttribute: (attr: string, value?: string) => R
8-
toHaveClass: (className: string) => R
9-
toHaveStyle: (css: string) => R
10-
toHaveTextContent: (text: string) => R
3+
toBeInTheDOM(container?: HTMLElement): R
4+
toBeVisible(): R
5+
toBeEmpty(): R
6+
toContainElement(element: HTMLElement): R
7+
toHaveAttribute(attr: string, value?: string): R
8+
toHaveClass(className: string): R
9+
toHaveStyle(css: string): R
10+
toHaveTextContent(text: string | RegExp): R
1111
}
1212
}

0 commit comments

Comments
 (0)