mirror of
https://github.com/callstack/react-native-testing-library.git
synced 2026-09-18 23:09:04 +08:00
feat: add getByType helper (#64)
* feat: add getByType helper * add docs
This commit is contained in:
committed by
GitHub
parent
235942bee3
commit
fa198c4037
@@ -113,6 +113,14 @@ A method returning a `ReactTestInstance` with matching a React component type. T
|
||||
|
||||
A method returning an array of `ReactTestInstance`s with matching a React component type.
|
||||
|
||||
### `getByType: (type: React.ComponentType<*>)`
|
||||
|
||||
A method returning a `ReactTestInstance` with matching a React component type. Throws when no matches.
|
||||
|
||||
### `getAllByType: (type: React.ComponentType<*>)`
|
||||
|
||||
A method returning an array of `ReactTestInstance`s with matching a React component type.
|
||||
|
||||
### `getByText: (text: string | RegExp)`
|
||||
|
||||
A method returning a `ReactTestInstance` with matching text – may be a string or regular expression. Throws when no matches.
|
||||
|
||||
Reference in New Issue
Block a user