How to test react-hook-form with react-native-testing-library
I use react-hook-form for both web and react native without a single problem. Great library. When using react-hook-form v6. I encountered an issue where the validation works perfectly in code, but in test, the errors
object is always empty even for wrong value. Let’s see how to solve it. In this blog, I will demostrate how to test react-hook-form
with react-native-testing-library
for both iOS and Android within one test through jest-expo
, and yes, we will use jest
as the test runner.