mirror of
https://github.com/callstack/react-native-testing-library.git
synced 2026-09-18 23:09:04 +08:00
chore(docs): improve render and queries description (#191)
This commit is contained in:
committed by
GitHub
parent
a467aaa87b
commit
8778012ed8
+13
-1
@@ -31,7 +31,19 @@ import { render } from 'react-native-testing-library';
|
||||
const { getByTestId, getByText /*...*/ } = render(<Component />);
|
||||
```
|
||||
|
||||
Returns a `RenderResult` object with [Queries](./Queries.md) and following helpers:
|
||||
The `render` method returns a `RenderResult` object that has a few properties:
|
||||
|
||||
### `...queries`
|
||||
|
||||
The most important feature of `render` is providing a set of helpful queries that allow you to find certain elements in the view hierarchy.
|
||||
|
||||
See [Queries](./Queries.md) for a complete list.
|
||||
|
||||
#### Example
|
||||
|
||||
```jsx
|
||||
const { getByText, queryByA11yRole } = render(<Component />);
|
||||
```
|
||||
|
||||
### `update`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user