Open
Description
Suggestion
In most cases, hooks should be an implementation detail and not tested in isolation. But, library maintainers would benefit from such features to battle test the hooks they offer to their users.
Most of the time (for simple and pure functions), hooks can be tested as a regular typescript/javascript function and won't require any tooling. In cases where hooks rely on qwik features or when they are more complex, being able to test them as if they were used within a Qwik component could be helpful.
In the React ecosystem, react-testing-library provides a renderHook
function to easily render a hook and control it. It could serve as inspiration.