feat: add getByType helper (#64)

* feat: add getByType helper

* add docs
This commit is contained in:
Michał Pierzchała
2018-11-19 13:44:51 +01:00
committed by GitHub
parent 235942bee3
commit fa198c4037
6 changed files with 74 additions and 0 deletions
+8
View File
@@ -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.