mirror of
https://github.com/callstack/react-native-testing-library.git
synced 2026-09-18 23:09:04 +08:00
docs: adjust wording around debug (#502)
This commit is contained in:
committed by
GitHub
parent
6bf86f915f
commit
1ec340c8a0
+4
-5
@@ -86,7 +86,7 @@ Usually you should not need to call `unmount` as it is done automatically if you
|
||||
debug(message?: string): void
|
||||
```
|
||||
|
||||
Prints deeply rendered component passed to `render` with optional message on top. Uses [debug.deep](#debug) under the hood, but it's easier to use.
|
||||
Pretty prints deeply rendered component passed to `render` with optional message on top.
|
||||
|
||||
```jsx
|
||||
const { debug } = render(<Component />);
|
||||
@@ -99,17 +99,16 @@ logs optional message and colored JSX:
|
||||
```jsx
|
||||
optional message
|
||||
|
||||
<TouchableOpacity
|
||||
activeOpacity={0.2}
|
||||
<View
|
||||
onPress={[Function bound fn]}
|
||||
>
|
||||
<Text>Press me</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
```
|
||||
|
||||
#### `debug.shallow`
|
||||
|
||||
Prints shallowly rendered component passed to `render` with optional message on top. Uses [debug.shallow](#debug) under the hood, but it's easier to use.
|
||||
Pretty prints shallowly rendered component passed to `render` with optional message on top.
|
||||
|
||||
### `toJSON`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user