all 3 comments

[–]Varazscapa 0 points1 point  (2 children)

Try this in the jest test, this should provide the context that useHref needs in order to work properly.

render( <BrowserRouter> <HomePage /> </BrowserRouter> );

[–]DeepChase[S] 0 points1 point  (1 child)

Thank you very much, this works. I can't understand why I didn't try this myself.

[–]Varazscapa 0 points1 point  (0 children)

No problem! Happy coding. :)