We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8bbe3f commit 7f1008eCopy full SHA for 7f1008e
types/test.tsx
@@ -84,6 +84,22 @@ export async function testWaitFor() {
84
await waitFor(() => {})
85
}
86
87
+export function testQueries() {
88
+ const {getByLabelText} = render(
89
+ <label htmlFor="usernameInput">Username</label>,
90
+ )
91
+ expectType<HTMLElement, ReturnType<typeof getByText>>(
92
+ getByLabelText('Username'),
93
94
+
95
+ const container = document.createElement('div')
96
+ const options = {container}
97
+ const {getByText} = render(<div>Hello World</div>, options)
98
99
+ getByText('Hello World'),
100
101
+}
102
103
/*
104
eslint
105
testing-library/prefer-explicit-assert: "off",
0 commit comments