Testing · Senior · Question 39 of 75

When is it better to test a custom hook via renderHook rather than through a component?

Explanation

For a hook used by one component, testing that component's behaviour gives more confidence with less coupling.

Further reading

Problem with a question

Testing · Senior · question 39

Test yourself

Take the Testing · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz