I'm trying to use getByRole in react native testing library but can't for the life of me figure out the syntax
Component in question-
<Text
accessibilityRole={'button'}
accessibilityLabel={'upvote count'}
style={[styles.upvoteText, styles.upvoteCount]}>
{upvoteCount}
</Text>
and my code
expect(getByRole('button', {name: 'upvote count'} as MatcherOptions)).toBe(2)