Mocking modules makes tests more fragile, I try to mock as little as is feasible when testing. Ideally I'd only use mocks for functions that I pass in, and I'd use those more as "spies" to make sure they're called correctly.
That seems like a solid testing example of a custom hook, as a unit test.
I work with pedagogies, teach, write curricula, coach, manage, mentor, consult, speak publicly, polemicize, and sometimes work as a full-stack web developer, architect, ontologist, and more.
Mocking modules makes tests more fragile, I try to mock as little as is feasible when testing. Ideally I'd only use mocks for functions that I pass in, and I'd use those more as "spies" to make sure they're called correctly.
That seems like a solid testing example of a custom hook, as a unit test.
I'm only mocking my own functions. I never mock libraries. I figure they should work fine.
I will give this some thought. Thanks for the responses.