Whenever testing components tax with Jest, it fails because it cannot use the useRouter hook... is there a proper way to mock it or configure the package properly with jest?
So far, assuming that TestComponent does contain only a Component that shows a translated text, what should I do
Whenever testing components tax with Jest, it fails because it cannot use the useRouter hook... is there a proper way to mock it or configure the package properly with jest?
So far, assuming that TestComponent does contain only a Component that shows a translated text, what should I do
As of now it fails with the following error:
Error: Uncaught [Error: NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted]
Thanks in advance.