Skip to content

Commit 8b7b466

Browse files
authored
docs: fix reference error in code sample (testing-library#947)
1 parent de6aefd commit 8b7b466

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/dom-testing-library/api-custom-queries.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ export function getAllByTestId(container, id, ...rest) {
4646
return els
4747
}
4848

49-
export function getByTestId(...args) {
49+
export function getByTestId(container, id, ...rest) {
5050
// result >= 1
51-
const result = getAllByTestId(...args)
51+
const result = getAllByTestId(container, id, ...rest)
5252
if (result.length > 1) {
5353
throw queryHelpers.getElementError(
5454
`Found multiple elements with the [data-test-id="${id}"]`,

0 commit comments

Comments
 (0)