Hello Joshua,
Thanks a lot for your valuable feedback, it's highly appreciated.
The article focuses on testing the Components indeed, that implies that the external logic is mocked (ie: hooks). By mocking the `useCustomHook`, we only test what is supposed to be tested: the Component's logic.
You have made a valuable point though: by testing the component, we're not testing the logic of the custom hook. MSW seems to be a great solution to seemlessly test these hooks by mocking the API responses.
Would you be interested to collaborate on writing another article which focuses on testing the react-query custom hooks? If so, please reach out to me at contact@nextglabs.com.
Looking forward to hear back from you soon!