Mocking hooks for unit testing widgets #349
Unanswered
josiahyeow
asked this question in
Q&A
Replies: 1 comment 11 replies
-
That isn't a thing and it can't/shouldn't be. |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way to mock a hook that's used in a HookWidget?
I want to test the HookWidget independently from the hooks it uses and write a seperate test for the hook itself.
The only solution I could think of is injecting the hooks as props to the Widget, but that kind of defeats the convenience of using hooks.
Beta Was this translation helpful? Give feedback.
All reactions