We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a18d41b commit 21cdc2cCopy full SHA for 21cdc2c
docs/ecosystem-jest-native.mdx
@@ -13,14 +13,16 @@ npm install --save-dev @testing-library/jest-native
13
```
14
15
```javascript
16
-;<View>
17
- <View testID="not-empty">
18
- <Text testID="empty" />
19
- </View>
20
- <Text testID="visible">Visible Example</Text>
21
-</View>
+const {queryByTestId} = render(
+ <View>
+ <View testID="not-empty">
+ <Text testID="empty" />
+ </View>
+ <Text testID="visible">Visible Example</Text>
22
+ </View>,
23
+)
24
-expect(queryByTestId(baseElement, 'not-empty')).not.toBeEmpty()
25
+expect(queryByTestId('not-empty')).not.toBeEmpty()
26
27
28
> Note: when using some of these matchers, you may need to make sure you use a
0 commit comments