Relative Content

Tag Archive for reactjsreact-hooksjestjsreact-testing-libraryreact-hook-form

How to write test to check if setValue is being called with correct value?

I’m currently working on writing a test for a select component using react-hook-forms. I have tried rewriting the test and mocking it many different ways, but I just can’t get the setValue hook mocked to check if it is called. Can someone please help me figure out what I’m doing wrong here?