Skip to content

Commit 09f1709

Browse files
JeffBaumgardtKent C. Dodds
authored and
Kent C. Dodds
committed
docs: fix typos and add link (#101)
Fix types I left in the getByRole section also add getByRole in the usage section
1 parent f73c044 commit 09f1709

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ when a real user uses it.
7777
- [`getByAltText`](#getbyalttext)
7878
- [`getByTitle`](#getbytitle)
7979
- [`getByValue`](#getbyvalue)
80+
- [`getByRole`](#getbyrole)
8081
- [`getByTestId`](#getbytestid)
8182
- [`wait`](#wait)
8283
- [`waitForElement`](#waitforelement)
@@ -361,15 +362,15 @@ getByRole(
361362
exact?: boolean = true,
362363
collapseWhitespace?: boolean = false,
363364
trim?: boolean = true,
364-
}): HTMLElement`
365+
}): HTMLElement
365366
```
366367

367368
A shortcut to `` container.querySelector(`[role="${yourRole}"]`) `` (and it
368369
also accepts a [`TextMatch`](#textmatch)).
369370

370371
```javascript
371372
// <div role="dialog">...</div>
372-
const dialogContainer = getByTestrole(container, 'dialog')
373+
const dialogContainer = getByRole(container, 'dialog')
373374
```
374375

375376
### `getByTestId`

0 commit comments

Comments
 (0)