Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Testing that a ref is passed to a view #1771

Unanswered
dcorbin asked this question in Q&A
Discussion options

Using jest and @testing-library/react-native, what's the best way to assert that the a ref was passed to a view? The best I've seen is to expect(ref.current).toBeDefined() which is very weak and does not test that it was given to the correct view.

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /