mirror of
https://github.com/callstack/react-native-testing-library.git
synced 2026-09-18 23:09:04 +08:00
docs: getAllByName -> getAllByType in example (#67)
<!-- Please provide enough information so that others can review your pull request. --> <!-- Keep pull requests small and focused on a single change. --> ### Summary Get rid of all `getAllByName` mentions in examples.
This commit is contained in:
committed by
GitHub
parent
85deb91e3e
commit
a052349ce7
@@ -37,8 +37,8 @@ function setAnswer(question, answer) {
|
||||
}
|
||||
|
||||
test('should verify two questions', () => {
|
||||
const { getAllByName, getByText } = render(<QuestionsBoard {...props} />);
|
||||
const allQuestions = getAllByName(Question);
|
||||
const { getAllByType, getByText } = render(<QuestionsBoard {...props} />);
|
||||
const allQuestions = getAllByType(Question);
|
||||
|
||||
setAnswer(allQuestions[0], 'a1');
|
||||
setAnswer(allQuestions[1], 'a2');
|
||||
|
||||
Reference in New Issue
Block a user