Closed hanhanhan closed 4 years ago
Should I? Can I?
https://stackoverflow.com/questions/62732303/how-do-i-pass-values-from-a-hook-into-a-component-rendered-by-a-test
It seems like a trade off between either mocking the hooks props, or going up the tree to call render, then querying for the component to be tested.
Is there anything better?
Hi @hanhanhan,
I have two blog posts that you might appreciate :)
I hope those help. Good luck!
Should I? Can I?
https://stackoverflow.com/questions/62732303/how-do-i-pass-values-from-a-hook-into-a-component-rendered-by-a-test
It seems like a trade off between either mocking the hooks props, or going up the tree to call render, then querying for the component to be tested.
Is there anything better?