Skip to content

Commit f2b4754

Browse files
committed
docs: update README
1 parent 75efa72 commit f2b4754

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

README.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,21 @@ You can find the source of `QuestionsBoard` component and this example [here](ht
119119

120120
## API / Usage
121121

122-
The public API of `@testing-library/react-native` is focused around these essential APIs:
123-
124-
- [`render`](https://callstack.github.io/react-native-testing-library/docs/render) – renders the given React element
125-
- [`screen`](https://callstack.github.io/react-native-testing-library/docs/screen) – queries for looking up rendered elements, as well as some useful helpers.
126-
- [`userEvent`](https://callstack.github.io/react-native-testing-library/docs/user-event) - realistic simulation of user interaction with elements like buttons and text inputs.
127-
- [`fireEvent`](https://callstack.github.io/react-native-testing-library/docs/fire-event) - general purpose event simulation.
128-
- [Jest matchers](https://callstack.github.io/react-native-testing-library/docs/jest-matchers) - validate assumptions about your components.
129-
- [`waitFor`](https://callstack.github.io/react-native-testing-library/docs/other#waitfor) - waits for non-deterministic periods of time until the queried element is added or times out.
130-
- [`waitForElementToBeRemoved`](https://callstack.github.io/react-native-testing-library/docs/other#waitforelementtoberemoved) - waits for non-deterministic periods of time until the queried element is removed or times out.
131-
- [`within`](https://callstack.github.io/react-native-testing-library/docs/other#within) - creates a queries object scoped for a given element.
122+
React Native Testing Library consists of following APIs:
123+
124+
- [`render` function](https://callstack.github.io/react-native-testing-library/docs/render) - render your UI components for testing purposes
125+
- [`screen` object](https://callstack.github.io/react-native-testing-library/docs/screen) - access rendered UI:
126+
- [Queries](https://callstack.github.io/react-native-testing-library/docs/screen#queries) - find rendered components by various predicates: role, text, test ids, etc
127+
- Lifecycle methods: [`rerender`](https://callstack.github.io/react-native-testing-library/docs/screen#rerender), [`unmount`](https://callstack.github.io/react-native-testing-library/docs/screen#unmount)
128+
- Helpers: [`debug`](https://callstack.github.io/react-native-testing-library/docs/screen#debug), [`toJSON`](https://callstack.github.io/react-native-testing-library/docs/screen#tojson), [`root`](https://callstack.github.io/react-native-testing-library/docs/screen#root)
129+
- [Jest matchers](https://callstack.github.io/react-native-testing-library/docs/jest-matchers) - validate assumptions about your UI
130+
- [User Event](https://callstack.github.io/react-native-testing-library/docs/user-event) - simulate common user interactions like [`press`](user-event#press) or [`type`](user-event#type) in a realistic way
131+
- [Fire Event](https://callstack.github.io/react-native-testing-library/docs/fire-event) - simulate any component event in a simplified way
132+
- [Other APIs](https://callstack.github.io/react-native-testing-library/docs/other):
133+
- [Async utils](https://callstack.github.io/react-native-testing-library/docs/other#async-utilities): `findBy*` queries, `waitFor`, `waitForElementToBeRemoved`
134+
- [Configuration](https://callstack.github.io/react-native-testing-library/docs/other#configuration): `configure`, `resetToDefaults`
135+
- [Accessibility](https://callstack.github.io/react-native-testing-library/docs/other#accessibility): `isHiddenFromAccessibility`
136+
- [Other](https://callstack.github.io/react-native-testing-library/docs/other#other-helpers): `within`, `act`, `cleanup`
132137

133138
## Migration Guides
134139

website/docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const siteConfig = {
4242
{
4343
key: 2,
4444
label: 'API',
45-
to: 'docs/render',
45+
to: 'docs/api',
4646
},
4747
],
4848
},

0 commit comments

Comments
 (0)