Skip to content

Commit 5ea9c7a

Browse files
authored
test: migrate RNTL Text to screen api (#2899)
1 parent 2e12f48 commit 5ea9c7a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { render } from "@testing-library/react-native"
1+
import { render, screen } from "@testing-library/react-native"
22
import { Text } from "./Text"
33

44
/* This is an example component test using react-native-testing-library. For more
@@ -8,7 +8,7 @@ const testText = "Test string"
88

99
describe("Text", () => {
1010
it("should render the component", () => {
11-
const { getByText } = render(<Text text={testText} />)
12-
expect(getByText(testText)).toBeDefined()
11+
render(<Text text={testText} />)
12+
expect(screen.getByText(testText)).toBeDefined()
1313
})
1414
})

0 commit comments

Comments
 (0)