We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e12f48 commit 5ea9c7aCopy full SHA for 5ea9c7a
boilerplate/app/components/Text.test.tsx
@@ -1,4 +1,4 @@
1
-import { render } from "@testing-library/react-native"
+import { render, screen } from "@testing-library/react-native"
2
import { Text } from "./Text"
3
4
/* This is an example component test using react-native-testing-library. For more
@@ -8,7 +8,7 @@ const testText = "Test string"
8
9
describe("Text", () => {
10
it("should render the component", () => {
11
- const { getByText } = render(<Text text={testText} />)
12
- expect(getByText(testText)).toBeDefined()
+ render(<Text text={testText} />)
+ expect(screen.getByText(testText)).toBeDefined()
13
})
14
0 commit comments