how to test useController using jest? #4243
-
hello, I was here trying to test a react component using jest. I ended up with a situation very similar to the one that was in the documentation. How do I test this component and mock the control parameter? `import React from "react"; function Input({ control, name }) { return <TextField {...inputProps} inputRef={ref} />; function App() { return ; |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
have a look at this file: https://github.com/react-hook-form/react-hook-form/blob/v7/src/__tests__/useController.test.tsx |
Beta Was this translation helpful? Give feedback.
have a look at this file: https://github.com/react-hook-form/react-hook-form/blob/v7/src/__tests__/useController.test.tsx