mirror of
https://github.com/callstack/react-native-testing-library.git
synced 2026-09-18 23:09:04 +08:00
docs: Remove misleading recommendation to use shallow in snapshot tests (#128)
### Summary I removed misleading recommendation to render components with `shallow` in snapshot tests as a result of the conversation in Issue #127. ### Test plan Review text in API.md
This commit is contained in:
committed by
Michał Pierzchała
parent
b3abf50a10
commit
09f9b9f05a
+1
-1
@@ -139,7 +139,7 @@ Get the rendered component JSON representation, e.g. for snapshot testing.
|
||||
|
||||
- [`Example code`](https://github.com/callstack/react-native-testing-library/blob/master/src/__tests__/shallow.test.js)
|
||||
|
||||
Shallowly renders given React component. Since it doesn't return helpers to query the output, it's mostly advised to used for snapshot testing (short snapshots are best for code reviewers).
|
||||
Shallowly renders given React component.
|
||||
|
||||
```jsx
|
||||
import { shallow } from 'react-native-testing-library';
|
||||
|
||||
Reference in New Issue
Block a user